hexsha
stringlengths
40
40
size
int64
6
1.04M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
247
max_stars_repo_name
stringlengths
4
130
max_stars_repo_head_hexsha
stringlengths
40
78
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
368k
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
247
max_issues_repo_name
stringlengths
4
130
max_issues_repo_head_hexsha
stringlengths
40
78
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
116k
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
247
max_forks_repo_name
stringlengths
4
130
max_forks_repo_head_hexsha
stringlengths
40
78
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
1
1.04M
avg_line_length
float64
1.53
618k
max_line_length
int64
1
1.02M
alphanum_fraction
float64
0
1
original_content
stringlengths
6
1.04M
filtered:remove_non_ascii
int64
0
538k
filtered:remove_decorators
int64
0
917k
filtered:remove_async
int64
0
722k
filtered:remove_classes
int64
-45
1M
filtered:remove_generators
int64
0
814k
filtered:remove_function_no_docstring
int64
-102
850k
filtered:remove_class_no_docstring
int64
-3
5.46k
filtered:remove_unused_imports
int64
-1,350
52.4k
filtered:remove_delete_markers
int64
0
59.6k
5ccb6a24d0e76921694aa036b37017f07029dff1
7,057
py
Python
linlearn/estimator/tmean.py
LinLearn/linlearn
de5752d47bbe8e2fb62d41b0dcf2526f87545e1c
[ "BSD-3-Clause" ]
null
null
null
linlearn/estimator/tmean.py
LinLearn/linlearn
de5752d47bbe8e2fb62d41b0dcf2526f87545e1c
[ "BSD-3-Clause" ]
null
null
null
linlearn/estimator/tmean.py
LinLearn/linlearn
de5752d47bbe8e2fb62d41b0dcf2526f87545e1c
[ "BSD-3-Clause" ]
null
null
null
# Authors: Stephane Gaiffas <stephane.gaiffas@gmail.com> # Ibrahim Merad <imerad7@gmail.com> # License: BSD 3 clause """ This module implement the ``TMean`` class for the trimmed-means robust estimator. `StateTMean` is a place-holder for the TMean estimator containing: """ from collections import namedtupl...
37.94086
128
0.54655
# Authors: Stephane Gaiffas <stephane.gaiffas@gmail.com> # Ibrahim Merad <imerad7@gmail.com> # License: BSD 3 clause """ This module implement the ``TMean`` class for the trimmed-means robust estimator. `StateTMean` is a place-holder for the TMean estimator containing: """ from collections import namedtupl...
0
4,210
0
2,158
0
0
0
57
111
76070ea40a45d68adecb44f6e49e28cbf613905d
610
py
Python
LeetCode_589.py
xulu199705/LeetCode
9a654a10117a93f9ad9728d6b86eb3713185545e
[ "MIT" ]
null
null
null
LeetCode_589.py
xulu199705/LeetCode
9a654a10117a93f9ad9728d6b86eb3713185545e
[ "MIT" ]
null
null
null
LeetCode_589.py
xulu199705/LeetCode
9a654a10117a93f9ad9728d6b86eb3713185545e
[ "MIT" ]
null
null
null
#
22.592593
58
0.503279
from typing import List class Node: def __init__(self, val=None, children=None): self.val = val self.children = children # 迭代先序遍历 class Solution: def preorder(self, root: 'Node') -> List[int]: if root == None: return [] ans = [] stack = [] stack.app...
18
0
0
531
0
0
0
2
67
81c9590de251767964ac11b32b67667e2d773702
448
py
Python
Examples/Session09/yield_example.py
Sharmila8/intropython2016
a69aa6f6d0cd28c6a29d0b8adb9ef1ff9e2e8479
[ "Unlicense" ]
null
null
null
Examples/Session09/yield_example.py
Sharmila8/intropython2016
a69aa6f6d0cd28c6a29d0b8adb9ef1ff9e2e8479
[ "Unlicense" ]
null
null
null
Examples/Session09/yield_example.py
Sharmila8/intropython2016
a69aa6f6d0cd28c6a29d0b8adb9ef1ff9e2e8479
[ "Unlicense" ]
null
null
null
# if __name__ == '__main__': # print "the generator function:" # print repr(counter) # print "call generator function" # c = counter() # print "the generator:" # print repr(c) # print 'iterate' # for item in c: # print 'received:', item
19.478261
38
0.540179
def counter(): print('counter: starting counter') i = -3 while i < 3: i = i + 1 print('counter: yield', i) yield i return None # if __name__ == '__main__': # print "the generator function:" # print repr(counter) # print "call generator function" # c = counter()...
0
0
0
0
145
0
0
0
22
ea7cde7eec2b5e8c99aacc733efb17738221bb81
4,318
py
Python
startrek-py/startrek/net/hub.py
moky/wormhole
bbfcfce13eb0ee86f8bb006deb7a3881173352c2
[ "MIT" ]
5
2020-05-24T03:35:00.000Z
2021-06-05T00:27:54.000Z
startrek-py/startrek/net/hub.py
moky/wormhole
bbfcfce13eb0ee86f8bb006deb7a3881173352c2
[ "MIT" ]
null
null
null
startrek-py/startrek/net/hub.py
moky/wormhole
bbfcfce13eb0ee86f8bb006deb7a3881173352c2
[ "MIT" ]
2
2020-09-11T05:29:11.000Z
2022-03-13T15:45:22.000Z
# -*- coding: utf-8 -*- # # Star Trek: Interstellar Transport # # Written in 2021 by Moky <albert.moky@gmail.com> # # ============================================================================== # MIT License # # Copyright (c) 2021 Albert Moky # # Permission is hereby granted, free of...
32.223881
119
0.603057
# -*- coding: utf-8 -*- # # Star Trek: Interstellar Transport # # Written in 2021 by Moky <albert.moky@gmail.com> # # ============================================================================== # MIT License # # Copyright (c) 2021 Albert Moky # # Permission is hereby granted, free of...
0
2,398
0
301
0
0
0
43
158
2b3dc140b83bd17428d4540aee0588d643a72af6
2,405
py
Python
Python_Misc/TMWP_OO_CustDataStructures.py
TheMitchWorksPro/DataTech_Playground
d62266d21762315f431fb4f707940095901b85e6
[ "MIT" ]
null
null
null
Python_Misc/TMWP_OO_CustDataStructures.py
TheMitchWorksPro/DataTech_Playground
d62266d21762315f431fb4f707940095901b85e6
[ "MIT" ]
null
null
null
Python_Misc/TMWP_OO_CustDataStructures.py
TheMitchWorksPro/DataTech_Playground
d62266d21762315f431fb4f707940095901b85e6
[ "MIT" ]
null
null
null
#!/usr/bin/python # Filename: TMWP_OO_CustDataStructures.py # TMWP = TheMitchWorksPro # Functions and/or Objects for smarter handling of common data structures # required imports are noted in the code where used/required # from ... import ... version = '0.1' python_version_support = 'code shoud be compatibi...
30.833333
92
0.575468
#!/usr/bin/python # Filename: TMWP_OO_CustDataStructures.py # TMWP = TheMitchWorksPro # Functions and/or Objects for smarter handling of common data structures # required imports are noted in the code where used/required # from ... import ... version = '0.1' python_version_support = 'code shoud be compatibi...
0
0
0
2,009
0
0
0
-3
46
afc7055446a0082505c7e85721cf070a71325344
30,535
py
Python
py/instalog/plugins/buffer_file_common.py
arccode/factory
a1b0fccd68987d8cd9c89710adc3c04b868347ec
[ "BSD-3-Clause" ]
3
2022-01-06T16:52:52.000Z
2022-03-07T11:30:47.000Z
py/instalog/plugins/buffer_file_common.py
arccode/factory
a1b0fccd68987d8cd9c89710adc3c04b868347ec
[ "BSD-3-Clause" ]
null
null
null
py/instalog/plugins/buffer_file_common.py
arccode/factory
a1b0fccd68987d8cd9c89710adc3c04b868347ec
[ "BSD-3-Clause" ]
1
2021-10-24T01:47:22.000Z
2021-10-24T01:47:22.000Z
# Copyright 2017 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """File-based buffer common. A file-based buffer which writes its events to a single file on disk, and separately maintains metadata. There are three fi...
38.360553
80
0.684166
# Copyright 2017 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """File-based buffer common. A file-based buffer which writes its events to a single file on disk, and separately maintains metadata. There are three fi...
0
350
0
14,886
0
0
0
91
158
b4d3fe982d7be10dd3d9466b7731e2b90baea895
17,861
py
Python
model/utils.py
Open-Debin/aCASTLE
4c539c53ad35bae4592165ca45488d0de90cbc29
[ "MIT" ]
1
2021-04-19T12:59:54.000Z
2021-04-19T12:59:54.000Z
model/utils.py
Open-Debin/aCASTLE
4c539c53ad35bae4592165ca45488d0de90cbc29
[ "MIT" ]
null
null
null
model/utils.py
Open-Debin/aCASTLE
4c539c53ad35bae4592165ca45488d0de90cbc29
[ "MIT" ]
null
null
null
import pprint import torch import numpy as np ## ------------------------ Basic Functions ------------------------ def one_hot(indices, depth): """ Returns a one-hot tensor. This is a PyTorch equivalent of Tensorflow's tf.one_hot. Parameters: indices: a (n_batch, m) Tensor or (m) Tensor. ...
43.038554
167
0.641621
import os import shutil import time import pprint import torch import argparse import numpy as np ## ------------------------ Basic Functions ------------------------ def one_hot(indices, depth): """ Returns a one-hot tensor. This is a PyTorch equivalent of Tensorflow's tf.one_hot. Parameters: ...
0
0
0
499
0
14,998
0
-6
655
1ac556c1e79ea42c23fedfe570a7165833c427cc
1,569
py
Python
openhab_creator/output/items/__init__.py
DerOetzi/openhab_creator
197876df5aae84192c34418f6b9a7cfcee23b195
[ "MIT" ]
1
2021-11-16T22:48:26.000Z
2021-11-16T22:48:26.000Z
openhab_creator/output/items/__init__.py
DerOetzi/openhab_creator
197876df5aae84192c34418f6b9a7cfcee23b195
[ "MIT" ]
null
null
null
openhab_creator/output/items/__init__.py
DerOetzi/openhab_creator
197876df5aae84192c34418f6b9a7cfcee23b195
[ "MIT" ]
null
null
null
from __future__ import annotations from typing import TYPE_CHECKING if TYPE_CHECKING:
30.173077
82
0.67304
from __future__ import annotations import os from importlib import import_module from typing import TYPE_CHECKING, List, Type, Dict, Union from openhab_creator import logger if TYPE_CHECKING: from openhab_creator.models.configuration import Configuration from openhab_creator.output.items.baseitemscreator imp...
0
507
0
673
0
0
0
134
166
283f91dc3ccaf741fa166962553da42322f2d25f
1,736
py
Python
clean.py
SatvikVejendla/Titanic-Survival-AI
bff812d1753de361a60202e9e729b3780b8a50ac
[ "MIT" ]
null
null
null
clean.py
SatvikVejendla/Titanic-Survival-AI
bff812d1753de361a60202e9e729b3780b8a50ac
[ "MIT" ]
null
null
null
clean.py
SatvikVejendla/Titanic-Survival-AI
bff812d1753de361a60202e9e729b3780b8a50ac
[ "MIT" ]
null
null
null
import pandas as pd from imblearn.over_sampling import RandomOverSampler import math #Training Data re = RandomOverSampler() df = pd.read_csv("data/raw/train.csv") y = df["Survived"] x = df.drop(["Survived", "Cabin", "Name", "PassengerId", "Ticket"], axis=1) embark = ["C", "Q", "S"] genders = ["male", "female"] ...
22.842105
75
0.619816
import pandas as pd from imblearn.over_sampling import RandomOverSampler import math #Training Data re = RandomOverSampler() df = pd.read_csv("data/raw/train.csv") y = df["Survived"] x = df.drop(["Survived", "Cabin", "Name", "PassengerId", "Ticket"], axis=1) embark = ["C", "Q", "S"] genders = ["male", "female"] ...
0
0
0
0
0
0
0
0
0
641b121922a6092e913d2f84335b0aad5dc05398
2,145
py
Python
src/harness/testcases/cu_pass/dpa_calculator/features/steps/dpa_neighborhood/environment/contexts/context_docker.py
NSF-Swift/Spectrum-Access-System
02cf3490c9fd0cec38074d3bdb3bca63bb7d03bf
[ "Apache-2.0" ]
null
null
null
src/harness/testcases/cu_pass/dpa_calculator/features/steps/dpa_neighborhood/environment/contexts/context_docker.py
NSF-Swift/Spectrum-Access-System
02cf3490c9fd0cec38074d3bdb3bca63bb7d03bf
[ "Apache-2.0" ]
null
null
null
src/harness/testcases/cu_pass/dpa_calculator/features/steps/dpa_neighborhood/environment/contexts/context_docker.py
NSF-Swift/Spectrum-Access-System
02cf3490c9fd0cec38074d3bdb3bca63bb7d03bf
[ "Apache-2.0" ]
null
null
null
from cu_pass.dpa_calculator.dpa.builder import RadioAstronomyFacilityNames ARBITRARY_BUCKET_NAME = 'arbitrary_bucket_name' ARBITRARY_DPA_NAME = RadioAstronomyFacilityNames.HatCreek.value ARBITRARY_NUMBER_OF_ITERATIONS = 1 ARBITRARY_RADIUS_IN_KILOMETERS = 2 ARBITRARY_OUTPUT_DIRECTORY = 'arbitrary_output_directory'
44.6875
131
0.844289
from typing import List from cu_pass.dpa_calculator.aggregate_interference_calculator.configuration.support.eirps import \ EIRP_DISTRIBUTION_MAP_TYPE from cu_pass.dpa_calculator.cbsd.cbsd import CbsdCategories from cu_pass.dpa_calculator.dpa.builder import RadioAstronomyFacilityNames from cu_pass.dpa_calculator.dp...
0
0
0
369
0
622
0
613
223
bf6189581c930d132f1857c28d3c0be6972362de
6,966
py
Python
tftpy/context/client.py
jcarswell/tftpy
9c171c7e969b80f2c00728df21d5534b3191620a
[ "MIT" ]
null
null
null
tftpy/context/client.py
jcarswell/tftpy
9c171c7e969b80f2c00728df21d5534b3191620a
[ "MIT" ]
null
null
null
tftpy/context/client.py
jcarswell/tftpy
9c171c7e969b80f2c00728df21d5534b3191620a
[ "MIT" ]
null
null
null
import logging logger = logging.getLogger('tftpy.context.client')
36.663158
113
0.548665
import logging import os import sys import time from typing import Union from io import IOBase from .base import Client from tftpy.shared import TIMEOUT_RETRIES from tftpy.packet import types from tftpy.exceptions import TftpException,TftpTimeout,TftpFileNotFoundError from tftpy.states import SentReadRQ,S...
0
0
0
6,522
0
0
0
82
283
b479d83b071cc8495e2321dfdca00c29ab7b085e
1,778
py
Python
lola/tests/test_coin_game.py
jleni/lola
9b9a2122aefc97d9ed1529b875912816f1acb5d6
[ "MIT" ]
125
2018-07-08T18:50:08.000Z
2022-03-07T09:31:12.000Z
lola/tests/test_coin_game.py
jleni/lola
9b9a2122aefc97d9ed1529b875912816f1acb5d6
[ "MIT" ]
11
2018-07-09T17:55:56.000Z
2021-04-13T23:49:40.000Z
lola/tests/test_coin_game.py
jleni/lola
9b9a2122aefc97d9ed1529b875912816f1acb5d6
[ "MIT" ]
36
2018-07-09T08:05:14.000Z
2022-03-12T19:52:49.000Z
import importlib max_steps = 1000 terminate_prob = 0.998 batch_size = 5 gameEnv = importlib.import_module('coin_game_v') env = gameEnv.gameEnv(terminate_prob=terminate_prob, max_steps=max_steps, batch_size=batch_size) print('state_space', env.state_space) print('red_pos', env.red_pos) print('blue_pos', env.blue_pos) ...
31.192982
96
0.697975
import importlib max_steps = 1000 terminate_prob = 0.998 batch_size = 5 gameEnv = importlib.import_module('coin_game_v') env = gameEnv.gameEnv(terminate_prob=terminate_prob, max_steps=max_steps, batch_size=batch_size) print('state_space', env.state_space) print('red_pos', env.red_pos) print('blue_pos', env.blue_pos) ...
0
0
0
0
0
0
0
0
0
1b639764948babc8a713fc8d7eae08b3a9be84bf
1,780
py
Python
src/sprites/Upgrade.py
NEKERAFA/Soul-Tower
d37c0bf6bcbf253ec5b2c41f802adeeca31fb384
[ "MIT" ]
null
null
null
src/sprites/Upgrade.py
NEKERAFA/Soul-Tower
d37c0bf6bcbf253ec5b2c41f802adeeca31fb384
[ "MIT" ]
null
null
null
src/sprites/Upgrade.py
NEKERAFA/Soul-Tower
d37c0bf6bcbf253ec5b2c41f802adeeca31fb384
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import os SPRITE_FILES = os.path.join("sprites", "interactives")
40.454545
108
0.629775
# -*- coding: utf-8 -*- import pygame, os from src.sprites.MyStaticSprite import * from src.sprites.Interactive import * from src.ResourceManager import * from src.scenes.stage.OnDialogueState import * SPRITE_FILES = os.path.join("sprites", "interactives") class Upgrade(MyStaticSprite, Interactive): def __init__...
2
0
0
1,497
0
0
0
80
111
e911a7d22b3f23667f14d95f7d6333c90dc8d5e9
1,034
py
Python
ml_ops/visualization_blog/lambdas/createdataset/dataset.py
sriharshams/amazon-forecast-samples
d33392329311f52e86fb414ffd9a1e944d36e881
[ "MIT-0" ]
405
2018-12-02T21:36:15.000Z
2022-03-29T12:52:40.000Z
ml_ops/visualization_blog/lambdas/createdataset/dataset.py
sriharshams/amazon-forecast-samples
d33392329311f52e86fb414ffd9a1e944d36e881
[ "MIT-0" ]
78
2018-12-20T21:33:02.000Z
2022-02-02T12:43:27.000Z
ml_ops/visualization_blog/lambdas/createdataset/dataset.py
sriharshams/amazon-forecast-samples
d33392329311f52e86fb414ffd9a1e944d36e881
[ "MIT-0" ]
344
2018-12-11T15:58:25.000Z
2022-03-31T11:09:41.000Z
from boto3 import client from loader import Loader ACCOUNTID = client('sts').get_caller_identity()['Account'] ARN = 'arn:aws:forecast:{region}:{account}:dataset/{name}' LOADER = Loader()
30.411765
79
0.673114
from os import environ from boto3 import client import actions from loader import Loader ACCOUNTID = client('sts').get_caller_identity()['Account'] ARN = 'arn:aws:forecast:{region}:{account}:dataset/{name}' LOADER = Loader() def lambda_handler(event, context): datasets = event['params']['Datasets'] status = ...
0
0
0
0
0
784
0
-6
67
3a807d7d060e94e9383acbae2b77682c4bf36733
2,834
py
Python
examples/id_based_encryption.py
elliptic-shiho/ecpy
ccdb872124ca2c218b8a7261a2956efd5ec83705
[ "MIT" ]
48
2016-03-30T07:20:49.000Z
2022-01-27T10:48:43.000Z
examples/id_based_encryption.py
elliptic-shiho/ecpy
ccdb872124ca2c218b8a7261a2956efd5ec83705
[ "MIT" ]
11
2017-03-26T11:03:20.000Z
2021-06-01T15:54:03.000Z
examples/id_based_encryption.py
elliptic-shiho/ecpy
ccdb872124ca2c218b8a7261a2956efd5ec83705
[ "MIT" ]
12
2016-06-05T19:09:26.000Z
2021-04-18T04:23:20.000Z
from ecpy import EllipticCurve, ExtendedFiniteField # PKI secret secret = 0xdeadbeef p = int("501794446334189957604282155189438160845433783392772743395579628617109" "929160215221425142482928909270259580854362463493326988807453595748573" "76419559953437557") l = (p + 1) / 6 F = ExtendedFiniteField(p,...
29.520833
79
0.613973
from ecpy import EllipticCurve, ExtendedFiniteField, symmetric_tate_pairing import hashlib import random import cPickle # PKI secret secret = 0xdeadbeef p = int("501794446334189957604282155189438160845433783392772743395579628617109" "929160215221425142482928909270259580854362463493326988807453595748573" ...
0
0
0
0
0
1,621
0
2
204
db6094ae5dcf25106c386a249c62bbdac1127a6e
4,784
py
Python
src/byro/plugins/sepa/migrations/0001_initial.py
dnet/byro
26dac998dfc2408224ebddc008f3df85f88f4a1a
[ "Apache-2.0" ]
114
2017-08-12T16:47:49.000Z
2022-03-17T12:22:59.000Z
src/byro/plugins/sepa/migrations/0001_initial.py
dnet/byro
26dac998dfc2408224ebddc008f3df85f88f4a1a
[ "Apache-2.0" ]
191
2017-08-13T09:12:37.000Z
2022-03-30T19:57:18.000Z
src/byro/plugins/sepa/migrations/0001_initial.py
dnet/byro
26dac998dfc2408224ebddc008f3df85f88f4a1a
[ "Apache-2.0" ]
45
2017-08-13T09:32:19.000Z
2022-03-11T21:36:29.000Z
# -*- coding: utf-8 -*- # Generated by Django 1.11.6 on 2017-10-12 20:32 from __future__ import unicode_literals
33.690141
139
0.354724
# -*- coding: utf-8 -*- # Generated by Django 1.11.6 on 2017-10-12 20:32 from __future__ import unicode_literals import annoying.fields import byro.common.models.auditable from django.db import migrations, models import django.db.models.deletion import localflavor.generic.models class Migration(migrations.Migration)...
0
0
0
4,479
0
0
0
57
134
1d56bd0859c31a8e9b68e858edb002f8e9a04340
5,438
py
Python
src/api/bkuser_core/categories/plugins/ldap/adaptor.py
shabbywu/bk-user
8ea590958a5c6dd3c71d0b72e1d4866ce327efda
[ "MIT" ]
null
null
null
src/api/bkuser_core/categories/plugins/ldap/adaptor.py
shabbywu/bk-user
8ea590958a5c6dd3c71d0b72e1d4866ce327efda
[ "MIT" ]
null
null
null
src/api/bkuser_core/categories/plugins/ldap/adaptor.py
shabbywu/bk-user
8ea590958a5c6dd3c71d0b72e1d4866ce327efda
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from typing import List from ldap3.utils import dn as dn_utils def parse_dn_tree(dn: str, restrict_types: List[str] = None) -> List[RDN]: """A DN is a sequence of relative distinguished names (RDN) connected by commas, For examples: we have a dn = "CN=Jeff Smith,OU=Sales,DC=Fabrik...
38.295775
115
0.668444
# -*- coding: utf-8 -*- from dataclasses import dataclass from typing import Any, Dict, List, NamedTuple, Optional from bkuser_core.categories.plugins.ldap.models import DepartmentProfile, UserProfile from bkuser_core.user_settings.loader import ConfigProvider from django.utils.encoding import force_str from ldap3.uti...
417
1,091
0
86
0
1,473
0
169
181
f1ebbe6c83b7976dc88a8d4893dacd7fb0cdb353
1,540
py
Python
Day04.py
lsiepman/AdventOfCode2017
3ec620bef0971ceeadee28605ec8defba33b4bc5
[ "MIT" ]
null
null
null
Day04.py
lsiepman/AdventOfCode2017
3ec620bef0971ceeadee28605ec8defba33b4bc5
[ "MIT" ]
null
null
null
Day04.py
lsiepman/AdventOfCode2017
3ec620bef0971ceeadee28605ec8defba33b4bc5
[ "MIT" ]
null
null
null
# IMPORTS # DATA data = [] with open("Data - Day04.txt") as file: for line in file: data.append(line.strip().split(" ")) # GOAL 1 """ A new system policy has been put in place that requires all accounts to use a passphrase instead of simply a password. A passphrase consists of a series of words (lowerca...
25.666667
105
0.698701
# IMPORTS # DATA data = [] with open("Data - Day04.txt") as file: for line in file: data.append(line.strip().split(" ")) # GOAL 1 """ A new system policy has been put in place that requires all accounts to use a passphrase instead of simply a password. A passphrase consists of a series of words (lowerca...
0
0
0
0
0
156
0
0
23
f3a48cb7c9060bd4d80fd365373cb167e56aa4aa
710
py
Python
src/azure-cli-core/azure/cli/core/auth/tests/test_adal_authentication.py
YuanyuanNi/azure-cli
63844964374858bfacd209bfe1b69eb456bd64ca
[ "MIT" ]
3,287
2016-07-26T17:34:33.000Z
2022-03-31T09:52:13.000Z
src/azure-cli-core/azure/cli/core/auth/tests/test_adal_authentication.py
YuanyuanNi/azure-cli
63844964374858bfacd209bfe1b69eb456bd64ca
[ "MIT" ]
19,206
2016-07-26T07:04:42.000Z
2022-03-31T23:57:09.000Z
src/azure-cli-core/azure/cli/core/auth/tests/test_adal_authentication.py
YuanyuanNi/azure-cli
63844964374858bfacd209bfe1b69eb456bd64ca
[ "MIT" ]
2,575
2016-07-26T06:44:40.000Z
2022-03-31T22:56:06.000Z
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
37.368421
94
0.557746
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
0
0
0
200
0
0
0
52
46
cc8b768dfe5908a23f0c137ef0e57006b53db5c0
5,861
py
Python
loggers_control/scripts/solo_escape_vpg_train.py
IRASatUC/two_loggers
c5c99868a9c896aa2fdb940f2f7b7173abed9e00
[ "MIT" ]
null
null
null
loggers_control/scripts/solo_escape_vpg_train.py
IRASatUC/two_loggers
c5c99868a9c896aa2fdb940f2f7b7173abed9e00
[ "MIT" ]
null
null
null
loggers_control/scripts/solo_escape_vpg_train.py
IRASatUC/two_loggers
c5c99868a9c896aa2fdb940f2f7b7173abed9e00
[ "MIT" ]
null
null
null
#! /usr/bin/env python """ An implementation of Vanilla Policy Gradient (VPG) for solo_escape_task VPG is a model free, on policy, reinforcement learning algorithm (https://papers.nips.cc/paper/1713-policy-gradient-methods-for-reinforcement-learning-with-function-approximation.pdf) Author: LinZHanK (linzhank@gmail.com)...
40.42069
183
0.627026
#! /usr/bin/env python """ An implementation of Vanilla Policy Gradient (VPG) for solo_escape_task VPG is a model free, on policy, reinforcement learning algorithm (https://papers.nips.cc/paper/1713-policy-gradient-methods-for-reinforcement-learning-with-function-approximation.pdf) Author: LinZHanK (linzhank@gmail.com)...
0
0
0
0
0
0
0
12
22
e45667b241db8c1639b0fc558affff0913b99a11
855
py
Python
buycoins/auth.py
iyanuashiri/buycoin-python-sdk
c791ad48dc2ca518c5e05c09fbcaf8e05f8a22b9
[ "MIT" ]
1
2021-05-12T11:24:11.000Z
2021-05-12T11:24:11.000Z
buycoins/auth.py
iyanuashiri/buycoin-python-sdk
c791ad48dc2ca518c5e05c09fbcaf8e05f8a22b9
[ "MIT" ]
null
null
null
buycoins/auth.py
iyanuashiri/buycoin-python-sdk
c791ad48dc2ca518c5e05c09fbcaf8e05f8a22b9
[ "MIT" ]
null
null
null
# Buycoin Python SDK # Copyright 2021 Iyanuoluwa Ajao # See LICENCE for details. """ Authentication is handled by the :any:`Airtable` class. >>> airtable = Airtable(base_key, table_name, api_key) Note: You can also use this class to handle authentication for you if you are making your own wrapper: >>> aut...
25.147059
96
0.65731
# Buycoin Python SDK # Copyright 2021 Iyanuoluwa Ajao # See LICENCE for details. """ Authentication is handled by the :any:`Airtable` class. >>> airtable = Airtable(base_key, table_name, api_key) Note: You can also use this class to handle authentication for you if you are making your own wrapper: >>> aut...
0
0
0
339
0
0
0
13
46
3fbb3343817355008ebb4eef4a88009376424e09
5,360
py
Python
Utilities/ReleaseScripts/scripts/ws_sso_content_reader.py
Purva-Chaudhari/cmssw
32e5cbfe54c4d809d60022586cf200b7c3020bcf
[ "Apache-2.0" ]
852
2015-01-11T21:03:51.000Z
2022-03-25T21:14:00.000Z
Utilities/ReleaseScripts/scripts/ws_sso_content_reader.py
Purva-Chaudhari/cmssw
32e5cbfe54c4d809d60022586cf200b7c3020bcf
[ "Apache-2.0" ]
30,371
2015-01-02T00:14:40.000Z
2022-03-31T23:26:05.000Z
Utilities/ReleaseScripts/scripts/ws_sso_content_reader.py
Purva-Chaudhari/cmssw
32e5cbfe54c4d809d60022586cf200b7c3020bcf
[ "Apache-2.0" ]
3,240
2015-01-02T05:53:18.000Z
2022-03-31T17:24:21.000Z
#!/usr/bin/env python3 ###Description: The tool reads cern web services behind SSO using user certificates from __future__ import print_function from optparse import OptionParser if __name__ == "__main__": parser = OptionParser(usage="%prog [-d(ebug)] -o(ut) COOKIE_FILENAME -c(cert) CERN-PEM -k(ey) CERT-KEY -u(rl) U...
44.666667
157
0.705037
#!/usr/bin/env python3 ###Description: The tool reads cern web services behind SSO using user certificates from __future__ import print_function import os, urllib, urllib2, httplib, cookielib, sys, HTMLParser, re from optparse import OptionParser def getFile(path): npath = os.path.expanduser(path) while os.path.is...
0
0
0
383
0
3,558
0
46
233
dfa763b060a7dac72bb41d68286cd5c008f99b9d
5,437
py
Python
client/verta/tests/custom_modules/test_custom_modules.py
mitdbg/modeldb
1d42591ea7ce2a1f7211e40dc46a79e53fa290f0
[ "MIT" ]
835
2017-02-08T20:14:24.000Z
2020-03-12T17:37:49.000Z
client/verta/tests/custom_modules/test_custom_modules.py
mitdbg/modeldb
1d42591ea7ce2a1f7211e40dc46a79e53fa290f0
[ "MIT" ]
113
2017-02-12T02:04:37.000Z
2019-12-05T09:33:12.000Z
client/verta/tests/custom_modules/test_custom_modules.py
mitdbg/modeldb
1d42591ea7ce2a1f7211e40dc46a79e53fa290f0
[ "MIT" ]
170
2017-02-13T14:49:22.000Z
2020-02-19T17:59:12.000Z
# -*- coding: utf-8 -*- from .. import utils
39.398551
97
0.622034
# -*- coding: utf-8 -*- import filecmp import json import os import pkgutil import zipfile import hypothesis import pytest import six from verta.tracking.entities._deployable_entity import _DeployableEntity from verta._internal_utils.custom_modules import CustomModules from .. import utils from . import contexts ...
0
2,461
0
2,634
0
0
0
27
268
9f0907cd2068ea5228993bfd0610324a10152909
135
py
Python
src/privatemedia/fileutils.py
Talengi/phase
60ff6f37778971ae356c5b2b20e0d174a8288bfe
[ "MIT" ]
8
2016-01-29T11:53:40.000Z
2020-03-02T22:42:02.000Z
src/privatemedia/fileutils.py
PhaseDMS/phase
4f776d0b1b5e7916a3e26aee890b3c2b9454ef0e
[ "MIT" ]
289
2015-03-23T07:42:52.000Z
2022-03-11T23:26:10.000Z
src/privatemedia/fileutils.py
Talengi/phase
60ff6f37778971ae356c5b2b20e0d174a8288bfe
[ "MIT" ]
7
2015-12-08T09:03:20.000Z
2020-05-11T15:36:51.000Z
# We need those imports for migrations compatibility purpose
45
73
0.844444
# We need those imports for migrations compatibility purpose from privatemedia.storage import ProtectedStorage, PrivateStorage # noqa
0
0
0
0
0
0
0
44
30
2d7635ac6f4ed320e89fc80aef9f0d67f08346b4
1,786
py
Python
remote/vagrant_api.py
devaos/sublime-remote
d0dd57f464d599f0277b76bc19a4ba8c940f081d
[ "MIT" ]
2
2016-12-30T12:43:54.000Z
2018-06-23T20:08:24.000Z
remote/vagrant_api.py
devaos/sublime-remote
d0dd57f464d599f0277b76bc19a4ba8c940f081d
[ "MIT" ]
null
null
null
remote/vagrant_api.py
devaos/sublime-remote
d0dd57f464d599f0277b76bc19a4ba8c940f081d
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # # Copyright (c) 2014 Ari Aosved # http://github.com/devaos/sublime-remote/blob/master/LICENSE """This module implements an API layer for Vagrant related functionality.""" import re import subprocess # ============================================================================= def parse_...
27.476923
79
0.56383
# -*- coding: utf-8 -*- # # Copyright (c) 2014 Ari Aosved # http://github.com/devaos/sublime-remote/blob/master/LICENSE """This module implements an API layer for Vagrant related functionality.""" import re import subprocess # ============================================================================= def parse_...
0
0
0
0
0
0
0
0
0
041bab6ee68b38136895b05d676af598dec6d4bb
10,708
py
Python
main.py
Aus-miner/Miner-Model
f7abc9f74cec00f82a2df6e359363670a64ad72f
[ "MIT" ]
18
2021-04-18T03:51:22.000Z
2022-03-16T13:14:36.000Z
main.py
Aus-miner/Miner-Model
f7abc9f74cec00f82a2df6e359363670a64ad72f
[ "MIT" ]
1
2021-05-04T14:27:02.000Z
2021-05-04T14:27:02.000Z
main.py
Aus-miner/Miner-Model
f7abc9f74cec00f82a2df6e359363670a64ad72f
[ "MIT" ]
8
2021-05-03T19:24:19.000Z
2022-02-20T22:20:18.000Z
import numpy as np from CMDataLoader import CMDataLoader import config import constants import random # my_palette = ["#264653","#9D1DC8","#287271", "#645DAC","#636EFA", "#ECA400","#FE484E","#8484E8", "#03b800" ,"#9251e1","#F4A261"] # my_palette = ["#54478c","#9D1DC8","#2c699a","#048ba8","#0db39e","#16db93","#83e377",...
67.345912
201
0.653063
import plotly.express as px import plotly.io as pio import plotly.graph_objects as go from plotly.subplots import make_subplots import pandas as pd import numpy as np from agents import * from generators import * from CMDataLoader import CMDataLoader from Simulator import Simulator from plotutils import update_layout...
0
0
0
0
0
8,331
0
72
338
2bd8edda0f4c727b34799dc6c9399a18d23a45a7
903
py
Python
src/testplates/impl/base/any_type.py
kprzybyla/testplates
156a373d9a0818c6074ec8d622d6ef1f867eafd3
[ "MIT" ]
null
null
null
src/testplates/impl/base/any_type.py
kprzybyla/testplates
156a373d9a0818c6074ec8d622d6ef1f867eafd3
[ "MIT" ]
null
null
null
src/testplates/impl/base/any_type.py
kprzybyla/testplates
156a373d9a0818c6074ec8d622d6ef1f867eafd3
[ "MIT" ]
null
null
null
__all__ = ( "extract_value", "extract_errors", ) from typing import (cast, Any, Type, Union, List) from testplates.impl.value import (MISSING) from testplates.impl.exceptions import (TestplatesError) from .attrs import (TESTPLATES_ERRORS_ATTR, TESTPLATES_VALUE_ATTR) def extract_value( instance: Any, )...
15.842105
74
0.657807
__all__ = ( "extract_value", "extract_errors", ) from typing import ( cast, Any, Type, Union, List, ) from testplates.impl.value import ( MISSING, ) from testplates.impl.exceptions import ( TestplatesError, ) from .attrs import ( TESTPLATES_ERRORS_ATTR, TESTPLATES_VALUE_A...
0
0
0
0
0
0
0
48
0
2d31ec77e7510699d2cc7549a1833146864202d2
7,699
py
Python
savu/plugins/alignment/projection_shift.py
elainehoml/Savu
e4772704606f71d6803d832084e10faa585e7358
[ "Apache-2.0" ]
39
2015-03-30T14:03:42.000Z
2022-03-16T16:50:33.000Z
savu/plugins/alignment/projection_shift.py
elainehoml/Savu
e4772704606f71d6803d832084e10faa585e7358
[ "Apache-2.0" ]
670
2015-02-11T11:08:09.000Z
2022-03-21T09:27:57.000Z
savu/plugins/alignment/projection_shift.py
elainehoml/Savu
e4772704606f71d6803d832084e10faa585e7358
[ "Apache-2.0" ]
54
2015-02-13T14:09:52.000Z
2022-01-24T13:57:09.000Z
# Copyright 2014 Diamond Light Source Ltd. # # 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 t...
38.113861
81
0.630471
# Copyright 2014 Diamond Light Source Ltd. # # 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 t...
0
6,464
0
0
0
0
0
171
223
6599a738ef385fda4ba36a0d5ccca971daa06188
458
py
Python
python_torch_test/test_index.py
wenhaopeter/read_pytorch_code
491f989cd918cf08874dd4f671fb7f0142a0bc4f
[ "Intel", "X11" ]
null
null
null
python_torch_test/test_index.py
wenhaopeter/read_pytorch_code
491f989cd918cf08874dd4f671fb7f0142a0bc4f
[ "Intel", "X11" ]
null
null
null
python_torch_test/test_index.py
wenhaopeter/read_pytorch_code
491f989cd918cf08874dd4f671fb7f0142a0bc4f
[ "Intel", "X11" ]
null
null
null
import torch # cand_ids = torch.randint(0,10000,(10,)) # print(cand_ids.dtype) # print(cand_ids.shape) scores = torch.Tensor([[ 0, 1, 2],[ 3, 4, 5],[ 6, 7, 8],[ 9, 10, 11]]) a=scores[0:2] # print(a) # print(scores.dtype) # print(scores.shape) # scores[[1,2,3]] # with torch.autograd.profiler.profile(record_shap...
26.941176
90
0.672489
import torch # cand_ids = torch.randint(0,10000,(10,)) # print(cand_ids.dtype) # print(cand_ids.shape) scores = torch.Tensor([[ 0, 1, 2],[ 3, 4, 5],[ 6, 7, 8],[ 9, 10, 11]]) a=scores[0:2] # print(a) # print(scores.dtype) # print(scores.shape) # scores[[1,2,3]] # with torch.autograd.profiler.profile(record_shap...
0
0
0
0
0
0
0
0
0
ff0aa4a18334faa1025b3b565c1234e541538556
4,378
py
Python
tests/test_workstation.py
soundstripe/jamberry
e5f7400ca274ceb357ef7098a32068f1b21db324
[ "MIT" ]
null
null
null
tests/test_workstation.py
soundstripe/jamberry
e5f7400ca274ceb357ef7098a32068f1b21db324
[ "MIT" ]
null
null
null
tests/test_workstation.py
soundstripe/jamberry
e5f7400ca274ceb357ef7098a32068f1b21db324
[ "MIT" ]
null
null
null
# uncomment these lines to see requests # import logging # logging.basicConfig(level=logging.DEBUG)
29.38255
106
0.731841
import csv from decimal import Decimal from itertools import islice from datetime import datetime, timedelta import pytest from bs4 import BeautifulSoup from src.jamberry.workstation import extract_shipping_address, extract_line_items, parse_order_row_soup, \ JamberryWorkstation # uncomment these lines to see ...
0
3,601
0
0
0
76
0
130
456
425fb837364f81528c19644a726599516ada187d
336
py
Python
address/migrations/0004_merge_20200328_0849.py
pedrovgp/cpm-django-address
f7c780aadb9a51df14677bd4681da073b68358cb
[ "BSD-3-Clause" ]
null
null
null
address/migrations/0004_merge_20200328_0849.py
pedrovgp/cpm-django-address
f7c780aadb9a51df14677bd4681da073b68358cb
[ "BSD-3-Clause" ]
null
null
null
address/migrations/0004_merge_20200328_0849.py
pedrovgp/cpm-django-address
f7c780aadb9a51df14677bd4681da073b68358cb
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.11 on 2020-03-28 11:49 from __future__ import unicode_literals
19.764706
47
0.66369
# -*- coding: utf-8 -*- # Generated by Django 1.11 on 2020-03-28 11:49 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('address', '0003_auto_20170718_1615'), ('address', '0002_auto_20160213_1726'), ] opera...
0
0
0
167
0
0
0
11
46
1577d38738d1df21a60bdf096aa6ca9a02c9b4ef
2,391
py
Python
coref/clustering_utils.py
AndreFCruz/coref-web-platform
845fd5461aad19a0f221077dbfbfd1d01766f0d6
[ "MIT" ]
9
2018-09-18T14:34:57.000Z
2022-01-28T12:34:50.000Z
coref/clustering_utils.py
AndreFCruz/coref-web-platform
845fd5461aad19a0f221077dbfbfd1d01766f0d6
[ "MIT" ]
null
null
null
coref/clustering_utils.py
AndreFCruz/coref-web-platform
845fd5461aad19a0f221077dbfbfd1d01766f0d6
[ "MIT" ]
null
null
null
""" clustering_utils.py: utilitary functions for the clustering.py module. """ import numpy as np from .utils import find_in_sequence def cluster_labels_to_entity_clusters(cluster_labels): """ @cluster_labels is the second return from the affinity_matrix computation, and cluster_labels[mention_idx] = m...
30.653846
94
0.662066
""" clustering_utils.py: utilitary functions for the clustering.py module. """ import numpy as np from enum import IntEnum from .utils import find_in_sequence class Link(IntEnum): """ Represents state of coreferring links. Must be negative integers to not interfere with the clustering process. """ ...
0
0
0
184
0
0
0
3
45
09f68ac9516db807bd112b0783e36067ee23def6
373
py
Python
Algorithms/Root Algorithms/hash.py
Ahmad-Fahad/Python
5a5f8f3395f7085947430b8309f6af70b2e25a77
[ "Apache-2.0" ]
null
null
null
Algorithms/Root Algorithms/hash.py
Ahmad-Fahad/Python
5a5f8f3395f7085947430b8309f6af70b2e25a77
[ "Apache-2.0" ]
null
null
null
Algorithms/Root Algorithms/hash.py
Ahmad-Fahad/Python
5a5f8f3395f7085947430b8309f6af70b2e25a77
[ "Apache-2.0" ]
null
null
null
intgr = 11 flt = 11.11 stng = "Eleven" tple = (1,2) lst = [1,2,3,4,5] h_i = hash(intgr) h_f = hash(flt) h_s = hash(stng) h_t = hash(tple) #h_l = hash(lst) print("hash of {} is {} ".format(intgr,h_i)) print("hash of {} is {} ".format(flt,h_f)) print("hash of {} is {} ".format(stng,h_s)) print("hash of {} is ...
21.941176
44
0.581769
intgr = 11 flt = 11.11 stng = "Eleven" tple = (1,2) lst = [1,2,3,4,5] h_i = hash(intgr) h_f = hash(flt) h_s = hash(stng) h_t = hash(tple) #h_l = hash(lst) print("hash of {} is {} ".format(intgr,h_i)) print("hash of {} is {} ".format(flt,h_f)) print("hash of {} is {} ".format(stng,h_s)) print("hash of {} is ...
0
0
0
0
0
0
0
0
0
43491ee16935885c90b9bd5ca040626a1f97ff54
876
py
Python
examples/line_performance.py
brisvag/pygfx
02e1f5ff92f50899ca990b712016e10d2914fcaf
[ "BSD-2-Clause" ]
60
2020-06-20T09:25:37.000Z
2022-03-31T23:06:30.000Z
examples/line_performance.py
brisvag/pygfx
02e1f5ff92f50899ca990b712016e10d2914fcaf
[ "BSD-2-Clause" ]
190
2020-06-17T09:11:43.000Z
2022-03-31T17:42:19.000Z
examples/line_performance.py
brisvag/pygfx
02e1f5ff92f50899ca990b712016e10d2914fcaf
[ "BSD-2-Clause" ]
2
2021-03-04T08:19:14.000Z
2022-01-02T16:31:15.000Z
""" Display a line depicting a noisy signal consisting of a lot of points. """ import numpy as np import pygfx as gfx from PySide6 import QtWidgets from wgpu.gui.qt import WgpuCanvas app = QtWidgets.QApplication([]) canvas = WgpuCanvas() renderer = gfx.WgpuRenderer(canvas) scene = gfx.Scene() # todo: crank this ...
23.052632
70
0.715753
""" Display a line depicting a noisy signal consisting of a lot of points. """ import numpy as np import pygfx as gfx from PySide6 import QtWidgets from wgpu.gui.qt import WgpuCanvas app = QtWidgets.QApplication([]) canvas = WgpuCanvas() renderer = gfx.WgpuRenderer(canvas) scene = gfx.Scene() # todo: crank this ...
0
0
0
0
0
0
0
0
0
4c6963d54922e9ad237b55a1a506357629e1b468
5,866
py
Python
tests/fit_param.py
harmslab/likelihood
3b6864631548c6fe989d3729fc150c76eac8928e
[ "MIT" ]
3
2020-04-30T21:55:49.000Z
2020-04-30T22:14:42.000Z
tests/fit_param.py
harmslab/likelihood
3b6864631548c6fe989d3729fc150c76eac8928e
[ "MIT" ]
null
null
null
tests/fit_param.py
harmslab/likelihood
3b6864631548c6fe989d3729fc150c76eac8928e
[ "MIT" ]
1
2020-04-30T21:55:08.000Z
2020-04-30T21:55:08.000Z
__description__ = \ """ Main class for holding fit parameters, including guesses, values, ranges, etc. """ __date__ = "2016-09-02" __author__ = "Michael J. Harms"
24.647059
105
0.468121
__description__ = \ """ Main class for holding fit parameters, including guesses, values, ranges, etc. """ __date__ = "2016-09-02" __author__ = "Michael J. Harms" import copy import numpy as np class FitParameter: """ Class for storing and manipulating generic fit parameters. """ def __init__(self,na...
0
3,360
0
2,288
0
0
0
-13
68
bde9bf927b8b96816899007c7fd3f79cd619b67c
12,907
py
Python
gridworld/agents/buildings/five_zone_rom_env.py
NREL/PowerGridworld
2f72ac5bb663092ca806c6fff9c7cf70f94fd775
[ "BSD-3-Clause" ]
24
2021-11-12T03:42:38.000Z
2022-02-27T17:22:30.000Z
gridworld/agents/buildings/five_zone_rom_env.py
NREL/PowerGridworld
2f72ac5bb663092ca806c6fff9c7cf70f94fd775
[ "BSD-3-Clause" ]
4
2021-11-11T03:27:58.000Z
2021-11-15T23:12:05.000Z
gridworld/agents/buildings/five_zone_rom_env.py
NREL/PowerGridworld
2f72ac5bb663092ca806c6fff9c7cf70f94fd775
[ "BSD-3-Clause" ]
2
2022-02-09T09:15:41.000Z
2022-02-24T14:56:40.000Z
import os import pickle import re from typing import Tuple import pandas as pd # Below are control variables' boundary. MAX_FLOW_RATE = [2.2, 2.2, 2.2, 2.2, 3.2] # Max flow rate for each individual zone MIN_FLOW_RATE = [.22, .22, .22, .22, .32] # Max flow rate for each individual zone MAX_TOTAL_FLOW_RATE = 10.0 #...
37.520349
108
0.643837
from abc import abstractmethod from collections import OrderedDict import os import pickle import re from typing import Tuple, Union import pandas as pd import numpy as np import gym from gridworld.log import logger from gridworld import ComponentEnv from gridworld.utils import to_scaled, to_raw, maybe_rescale_box_s...
0
134
0
10,444
0
0
0
204
268
eb7c87060f871a6453a9831294ee566533778c5a
1,512
py
Python
external_apps/timezones/tests.py
davemerwin/blue-channel
67a1a7fcc512574e6522aa57633f9d69c25c8906
[ "BSD-3-Clause" ]
4
2016-05-08T06:07:50.000Z
2021-11-21T19:41:40.000Z
apps/external_apps/timezones/tests.py
indro/t2c
56482ad4aed150f29353e054db2c97b567243bf8
[ "MIT" ]
null
null
null
apps/external_apps/timezones/tests.py
indro/t2c
56482ad4aed150f29353e054db2c97b567243bf8
[ "MIT" ]
3
2017-07-09T02:14:54.000Z
2021-07-13T19:16:59.000Z
__test__ = {"API_TESTS": r""" >>> from django.conf import settings >>> ORIGINAL_TIME_ZONE = settings.TIME_ZONE >>> settings.TIME_ZONE = "UTC" >>> from timezones import forms # the default case where no timezone is given explicitly. # uses settings.TIME_ZONE. >>> f = forms.LocalizedDateTimeField() >>> f.clean("2008-0...
32.869565
99
0.681217
__test__ = {"API_TESTS": r""" >>> from django.conf import settings >>> ORIGINAL_TIME_ZONE = settings.TIME_ZONE >>> settings.TIME_ZONE = "UTC" >>> from timezones import forms # the default case where no timezone is given explicitly. # uses settings.TIME_ZONE. >>> f = forms.LocalizedDateTimeField() >>> f.clean("2008-0...
0
0
0
0
0
0
0
0
0
7daec3f052dbf49bcff51f38ad65316565f865b2
2,773
py
Python
app.py
ghanmi-hamza/Crunshbase_Scraper
6255693690d33d7dabce3695affa8ff4668eeef2
[ "Apache-2.0" ]
null
null
null
app.py
ghanmi-hamza/Crunshbase_Scraper
6255693690d33d7dabce3695affa8ff4668eeef2
[ "Apache-2.0" ]
null
null
null
app.py
ghanmi-hamza/Crunshbase_Scraper
6255693690d33d7dabce3695affa8ff4668eeef2
[ "Apache-2.0" ]
null
null
null
from flask import Flask app= Flask(__name__) if __name__=='__main__': app.run(debug=True)
31.511364
91
0.569419
from functions import Profile from mongodb import MongoDb from flask import Flask, render_template, request, redirect app= Flask(__name__) @app.route('/') def start(): return(render_template('view.html')) @app.route('/',methods=['POST']) def index(): if request.method == 'POST': startup_list = r...
0
2,534
0
0
0
0
0
50
90
b5f856a2986cde9d382ce5d575f5d958c091b8ab
948
py
Python
src/gui/main_app.py
AndruePeters/fire_stream
8e1a89d4fe02500fbe202d6a0212ac7eaab32e00
[ "Apache-2.0" ]
null
null
null
src/gui/main_app.py
AndruePeters/fire_stream
8e1a89d4fe02500fbe202d6a0212ac7eaab32e00
[ "Apache-2.0" ]
null
null
null
src/gui/main_app.py
AndruePeters/fire_stream
8e1a89d4fe02500fbe202d6a0212ac7eaab32e00
[ "Apache-2.0" ]
null
null
null
### Represents the main application, which is the combination of multiple frames
39.5
99
0.732068
from tkinter import ttk import tkinter as tk import tkinter.messagebox from gui.menu_bar import MenuBar from gui.stream_frame import StreamFrame from config_file.fire_stream import ConfigFile ### Represents the main application, which is the combination of multiple frames class MainApplication(ttk.Frame): def __...
0
0
0
651
0
0
0
60
156
e5257525dd50663af6d42d8fcc65da7cae7adc9b
9,064
py
Python
clu/compilation/compiledb.py
fish2000/CLU
80bc2df5f001b5639d79ba979e19ec77a9931425
[ "BSD-3-Clause" ]
1
2019-07-02T08:17:59.000Z
2019-07-02T08:17:59.000Z
clu/compilation/compiledb.py
fish2000/CLU
80bc2df5f001b5639d79ba979e19ec77a9931425
[ "BSD-3-Clause" ]
13
2019-12-17T02:28:30.000Z
2021-11-17T03:46:10.000Z
clu/compilation/compiledb.py
fish2000/CLU
80bc2df5f001b5639d79ba979e19ec77a9931425
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import print_function import abc # import clu.abstract import sys abstract = abc.abstractmethod from clu.constants.exceptions import CDBError # from clu.predicates import tuplize from clu.exporting import Exporter exporter = Exporter(path=__file__) export = exporter.decorator(...
29.718033
83
0.553288
# -*- coding: utf-8 -*- from __future__ import print_function import abc # import clu.abstract import collections.abc import contextlib import json import sys, os abstract = abc.abstractmethod from clu.constants import consts from clu.constants.exceptions import CDBError from clu.fs.abc import BaseFSName from clu.fs...
78
7,881
0
0
0
321
0
71
269
a32c7f51dddaf8600bf3abf4629e346738287384
5,067
py
Python
c-kernel/test/test_cleaners.py
Song655/arlo
cee1613d4a2b2e1263da9d5b4b9930eef569509c
[ "Apache-2.0" ]
1
2019-10-18T13:11:01.000Z
2019-10-18T13:11:01.000Z
c-kernel/test/test_cleaners.py
Song655/arlo
cee1613d4a2b2e1263da9d5b4b9930eef569509c
[ "Apache-2.0" ]
1
2019-01-28T23:07:32.000Z
2019-01-28T23:07:32.000Z
c-kernel/test/test_cleaners.py
Song655/arlo
cee1613d4a2b2e1263da9d5b4b9930eef569509c
[ "Apache-2.0" ]
5
2018-03-27T03:30:34.000Z
2019-10-18T13:05:37.000Z
import sys sys.path.append('../../arl-python') import numpy as np import argparse if __name__ == '__main__': np.random.seed(0) parser = argparse.ArgumentParser() parser.add_argument('--data_dir', type=str, default='./data') parser.add_argument('--niter', type=int, default=0) parser.add_argume...
36.453237
110
0.678705
import os import sys sys.path.append('../../arl-python') import numpy as np import time import argparse from arl.image.cleaners import * from utils import * def msmfsclean_simplify(dirty, psf, window, gain, thresh, niter, scales, fracthresh, findpeak='CASA'): assert 0.0 < gain < 2.0 assert niter > 0 as...
0
0
0
0
0
4,053
0
-13
135
cd3da064f9bd501772402261c8f184e8c014f863
143
py
Python
02_sequences/0206_augmented_assignment/020601_list/__main__.py
forseti/py-workout-01
9ebb36748ec7d4751b2c81086134df320c0f58ed
[ "Apache-2.0" ]
null
null
null
02_sequences/0206_augmented_assignment/020601_list/__main__.py
forseti/py-workout-01
9ebb36748ec7d4751b2c81086134df320c0f58ed
[ "Apache-2.0" ]
null
null
null
02_sequences/0206_augmented_assignment/020601_list/__main__.py
forseti/py-workout-01
9ebb36748ec7d4751b2c81086134df320c0f58ed
[ "Apache-2.0" ]
null
null
null
l = [1, 2, 3] id1 = id(l) print(f"id1: {id1}") l *= 2 id2 = id(l) print(f"id2: {id2}") assert id1 == id2 print(f"id1 == id2: {id1 == id2}")
11.916667
34
0.503497
l = [1, 2, 3] id1 = id(l) print(f"id1: {id1}") l *= 2 id2 = id(l) print(f"id2: {id2}") assert id1 == id2 print(f"id1 == id2: {id1 == id2}")
0
0
0
0
0
0
0
0
0
81ab10c9e68eaa61ece5a776c79bd7fc8186ea7b
4,691
py
Python
tests/word_distance.py
nv-d/open-tamil
0fcb1cece5ffd6263210db987bede09566353e80
[ "MIT" ]
2
2021-07-17T02:52:38.000Z
2021-07-17T02:52:52.000Z
tests/word_distance.py
nv-d/open-tamil
0fcb1cece5ffd6263210db987bede09566353e80
[ "MIT" ]
null
null
null
tests/word_distance.py
nv-d/open-tamil
0fcb1cece5ffd6263210db987bede09566353e80
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # (C) 2015 Muthiah Annamalai # # This file is part of 'open-tamil' package tests # # setup the paths from __future__ import print_function if __name__ == "__main__": unittest.main()
30.070513
88
0.484971
# -*- coding: utf-8 -*- # (C) 2015 Muthiah Annamalai # # This file is part of 'open-tamil' package tests # # setup the paths from __future__ import print_function from opentamiltests import * class WordsSimilarityLevenshtein(unittest.TestCase): def test_Levenshtein_distance(self): values = [ ...
906
0
0
4,051
0
0
0
7
114
4e012ce81d73ddb0a61c59fd864ed7590f969a8d
99
py
Python
blog/publications/admin.py
Thierryvil/blog-rest-django3
1c7a224d531cea86812142d4d488d99431aa05e9
[ "MIT" ]
null
null
null
blog/publications/admin.py
Thierryvil/blog-rest-django3
1c7a224d531cea86812142d4d488d99431aa05e9
[ "MIT" ]
null
null
null
blog/publications/admin.py
Thierryvil/blog-rest-django3
1c7a224d531cea86812142d4d488d99431aa05e9
[ "MIT" ]
null
null
null
from django.contrib import admin from .models import Publication admin.site.register(Publication)
19.8
32
0.838384
from django.contrib import admin from .models import Publication admin.site.register(Publication)
0
0
0
0
0
0
0
0
0
9647183d77c8685b21250b167a7a0bb8f6a2de37
265
py
Python
mopidy_async_client/__init__.py
SvineruS/mopidy-json-client
b1fe6eea02f9dbf9fe0c9d1d087421184fd2e0c9
[ "Apache-2.0" ]
null
null
null
mopidy_async_client/__init__.py
SvineruS/mopidy-json-client
b1fe6eea02f9dbf9fe0c9d1d087421184fd2e0c9
[ "Apache-2.0" ]
null
null
null
mopidy_async_client/__init__.py
SvineruS/mopidy-json-client
b1fe6eea02f9dbf9fe0c9d1d087421184fd2e0c9
[ "Apache-2.0" ]
null
null
null
"""Async Mopidy Client via JSON/RPC Websocket interface""" # Fork of https://github.com/ismailof/mopidy-json-client by ismailof __author__ = 'svinerus (svinerus@gmail.com)' __version__ = '0.6.4' from .client import MopidyClient __all__ = [ 'MopidyClient', ]
22.083333
68
0.732075
"""Async Mopidy Client via JSON/RPC Websocket interface""" # Fork of https://github.com/ismailof/mopidy-json-client by ismailof __author__ = 'svinerus (svinerus@gmail.com)' __version__ = '0.6.4' from .client import MopidyClient __all__ = [ 'MopidyClient', ]
0
0
0
0
0
0
0
0
0
4fa0c6f8f2e70c57688b182c75fe8f7d7e0e1e4e
149
py
Python
dhost/dapps/utils.py
dhost-project/dhost
ca6a4a76a737174b24165e20edeb1d1019a9424b
[ "MIT" ]
null
null
null
dhost/dapps/utils.py
dhost-project/dhost
ca6a4a76a737174b24165e20edeb1d1019a9424b
[ "MIT" ]
67
2021-07-06T11:50:25.000Z
2021-10-14T13:45:51.000Z
dhost/dapps/utils.py
dhost-project/dhost
ca6a4a76a737174b24165e20edeb1d1019a9424b
[ "MIT" ]
null
null
null
def get_dapp_type(dapp): """Return the available dapp implementation.""" if hasattr(dapp, "ipfsdapp"): return "ipfs" return None
24.833333
51
0.651007
def get_dapp_type(dapp): """Return the available dapp implementation.""" if hasattr(dapp, "ipfsdapp"): return "ipfs" return None
0
0
0
0
0
0
0
0
0
7074a2be32b9d2c703f8ca0dfd6cef5ce9b6dabc
15,067
py
Python
kraken_report.py
mpieva/nuclear_sediment_pipeline
3570ad8c217d8f54f8b1c888d1f4ce5d29388742
[ "MIT" ]
1
2021-04-16T17:18:14.000Z
2021-04-16T17:18:14.000Z
kraken_report.py
mpieva/nuclear_sediment_pipeline
3570ad8c217d8f54f8b1c888d1f4ce5d29388742
[ "MIT" ]
null
null
null
kraken_report.py
mpieva/nuclear_sediment_pipeline
3570ad8c217d8f54f8b1c888d1f4ce5d29388742
[ "MIT" ]
null
null
null
"""Parse a kraken output file and generate a report and possibly extract reads for selected clades. (Adapted from original kraken-report.pl) """ import sys import gzip from Bio import SeqIO from collections import defaultdict import os import json #grep 'scientific name' names.dmp |cut -d'|' -f 1,2 |gzip -c >names_tri...
44.842262
172
0.629521
"""Parse a kraken output file and generate a report and possibly extract reads for selected clades. (Adapted from original kraken-report.pl) """ import sys import gzip from csv import reader from Bio import SeqIO from pysam import AlignmentFile from collections import defaultdict import argparse from pathlib import Pa...
0
35
0
0
0
9,420
0
4
274
337618b4d7d2e40d90ad9aa116afb1da1ebe6553
1,808
py
Python
pythonforandroid/recipes/lxml/__init__.py
gruns/python-for-android
1bee8a821d57c39492cf633112673bf6ce0be8db
[ "MIT" ]
1
2022-01-26T18:42:36.000Z
2022-01-26T18:42:36.000Z
pythonforandroid/recipes/lxml/__init__.py
gruns/python-for-android
1bee8a821d57c39492cf633112673bf6ce0be8db
[ "MIT" ]
null
null
null
pythonforandroid/recipes/lxml/__init__.py
gruns/python-for-android
1bee8a821d57c39492cf633112673bf6ce0be8db
[ "MIT" ]
1
2020-05-24T16:28:13.000Z
2020-05-24T16:28:13.000Z
from pythonforandroid.toolchain import shprint, current_directory recipe = LXMLRecipe()
48.864865
162
0.714049
from pythonforandroid.toolchain import Recipe, shprint, shutil, current_directory from pythonforandroid.toolchain import CompiledComponentsPythonRecipe from pythonforandroid.util import current_directory, ensure_dir from pythonforandroid.logger import debug, shprint, info from os.path import exists, join, dirname impor...
0
0
0
1,425
0
0
0
139
155
6718bf877b76b460a1a15a78d00cdea02e635882
12,871
py
Python
gerrit-report2.py
rfrandse/test
e2e5cb46fecff1be16b3089dd22a8cb6e99f3ac9
[ "Unlicense" ]
null
null
null
gerrit-report2.py
rfrandse/test
e2e5cb46fecff1be16b3089dd22a8cb6e99f3ac9
[ "Unlicense" ]
null
null
null
gerrit-report2.py
rfrandse/test
e2e5cb46fecff1be16b3089dd22a8cb6e99f3ac9
[ "Unlicense" ]
null
null
null
#!/usr/bin/python import argparse import config from slacker import Slacker slack = Slacker(config.token) option_age = "" option_owner = None option_protocol = 'slack' option_ssm = None option_stat = None query_cache = {} HOST="openbmc.gerrit" username_map = { 'irc': { 'jenkins-openbmc': "Jenkins...
31.316302
99
0.569963
#!/usr/bin/python import argparse import subprocess import json import re import config import collections from datetime import datetime, timedelta import time from pprint import pprint from slacker import Slacker slack = Slacker(config.token) option_age = "" option_owner = None option_protocol = 'slack' option_ss...
0
0
0
0
0
8,870
0
-16
361
c1a33fc9fe9a26dbd52187a7e35bad49770d75e5
9,457
py
Python
pycat/base/event/window_event_manager.py
cmorace/pycat
7abc53f90a03b4961c10003eaca2c01efec9e4d2
[ "MIT" ]
null
null
null
pycat/base/event/window_event_manager.py
cmorace/pycat
7abc53f90a03b4961c10003eaca2c01efec9e4d2
[ "MIT" ]
null
null
null
pycat/base/event/window_event_manager.py
cmorace/pycat
7abc53f90a03b4961c10003eaca2c01efec9e4d2
[ "MIT" ]
null
null
null
"""The window_event_manager module implements the WindowEventManager class."""
40.072034
78
0.639103
"""The window_event_manager module implements the WindowEventManager class.""" from typing import Callable, Dict, List, Set, Union from pyglet.window import Window as PygletWindow from pycat.base.event.key_event import KeyEvent from pycat.base.event.mouse_event import MouseEvent from pycat.geometry.point import Poin...
0
921
0
8,010
0
0
0
244
202
40bf95dfded92821b08f049465563ccb6b9628be
949
py
Python
itrack/urls.py
AmlHanfy/iTrack-Project
6afe64ff3bd78c6c9dc93d68c0ed52708a8dcb1a
[ "Apache-2.0" ]
null
null
null
itrack/urls.py
AmlHanfy/iTrack-Project
6afe64ff3bd78c6c9dc93d68c0ed52708a8dcb1a
[ "Apache-2.0" ]
null
null
null
itrack/urls.py
AmlHanfy/iTrack-Project
6afe64ff3bd78c6c9dc93d68c0ed52708a8dcb1a
[ "Apache-2.0" ]
3
2018-01-23T19:08:22.000Z
2018-09-25T06:47:24.000Z
''' this module contains all the urls for the whole project ''' from django.contrib import admin from django.urls import path, include from django.contrib.staticfiles.urls import staticfiles_urlpatterns from django.conf import settings from django.conf.urls.static import static # from django.views.generic imp...
36.5
77
0.72392
''' this module contains all the urls for the whole project ''' from django.contrib import admin from django.urls import path,include from article import views as articleViews from django.contrib.staticfiles.urls import staticfiles_urlpatterns from django.conf import settings from django.conf.urls.static impo...
0
0
0
0
0
0
0
19
23
962ccfa4e838d3a0b196a2a719fdce3234b0b6c1
764
py
Python
stringsetup.py
TeamDragons/Dragons-Userbot
e40584f4dc898b785523adea4519ffb412dc92c4
[ "MIT" ]
3
2021-08-11T08:33:39.000Z
2022-01-17T00:09:11.000Z
stringsetup.py
sophiashirashaki/Dragons-Userbot
2255c18428e488a267eaec1ec8c081fabcde167a
[ "MIT" ]
null
null
null
stringsetup.py
sophiashirashaki/Dragons-Userbot
2255c18428e488a267eaec1ec8c081fabcde167a
[ "MIT" ]
6
2021-08-14T08:20:41.000Z
2022-03-20T02:31:45.000Z
#!/usr/bin/env python3 # (c) https://t.me/TelethonChat/37677 # This Source Code Form is subject to the terms of the GNU # MIT TeamDragons If a copy of the developer was not distributed with this # file, You can obtain one at https://www.gnu.org/licenses/MIT/TeamDragons from telethon.sessions import StringSession from ...
34.727273
74
0.755236
#!/usr/bin/env python3 # (c) https://t.me/TelethonChat/37677 # This Source Code Form is subject to the terms of the GNU # MIT TeamDragons If a copy of the developer was not distributed with this # file, You can obtain one at https://www.gnu.org/licenses/MIT/TeamDragons from telethon.sessions import StringSession from ...
0
0
0
0
0
0
0
0
0
8c0aba7c3f75f22e54bc31dcc941aa754266bf3a
1,650
py
Python
permutation.py
pranaylobo/Team-Kalm-CP
daa967d84ccd162efc0b7f19448daa01f745e7e2
[ "Apache-2.0" ]
null
null
null
permutation.py
pranaylobo/Team-Kalm-CP
daa967d84ccd162efc0b7f19448daa01f745e7e2
[ "Apache-2.0" ]
1
2021-02-15T16:02:47.000Z
2021-02-15T16:02:47.000Z
permutation.py
pranaylobo/Team-Kalm-CP
daa967d84ccd162efc0b7f19448daa01f745e7e2
[ "Apache-2.0" ]
1
2021-02-16T04:53:47.000Z
2021-02-16T04:53:47.000Z
node=[1,2,3] key=0 current_level={} node_store=[] main(node,key,current_level,node_store)
21.710526
118
0.565455
def branches(node,current_level,key,node_store): temp_current_level = current_level.copy() # print(node_store) for index,num in enumerate(node): current_root = temp_current_level[num].copy() current_leafnode = current_root[0].get(num).copy() # print(current_leaf...
0
0
0
0
0
1,501
0
0
46
943f941b685bb98bbee64264564ff9847ddca2c1
8,005
py
Python
scripts/alvar_marker_to_baxter_picking_pose.py
birlrobotics/birl_kitting_experiment
75cf42b6fd187b12e99b0e916c73058f429a556c
[ "BSD-3-Clause" ]
2
2019-06-03T03:33:50.000Z
2019-12-30T05:43:34.000Z
scripts/alvar_marker_to_baxter_picking_pose.py
birlrobotics/birl_kitting_experiment
75cf42b6fd187b12e99b0e916c73058f429a556c
[ "BSD-3-Clause" ]
null
null
null
scripts/alvar_marker_to_baxter_picking_pose.py
birlrobotics/birl_kitting_experiment
75cf42b6fd187b12e99b0e916c73058f429a556c
[ "BSD-3-Clause" ]
1
2019-12-30T05:43:35.000Z
2019-12-30T05:43:35.000Z
#!/usr/bin/env python import rospy from ar_track_alvar_msgs.msg import AlvarMarkers import tf from tf.transformations import (translation_matrix, quaternion_matrix, translation_from_matrix, quaternion_from_matrix) import threading import copy import numpy comfortable_pick_frame = numpy.matrix([[0.9270661704094123, 0.3...
35.577778
283
0.566396
#!/usr/bin/env python import rospy from ar_track_alvar_msgs.msg import AlvarMarkers import tf from tf.transformations import ( translation_matrix, quaternion_matrix, translation_from_matrix, quaternion_from_matrix, ) import threading import copy import numpy import ipdb comfortable_pick_frame = numpy.m...
0
0
0
0
0
967
0
9
91
38f856dac8ab642dc811a76eee8077f057643a7b
1,600
py
Python
nova/api/openstack/compute/schemas/hypervisors.py
teresa-ho/stx-nova
1f82323439da2449edbbaed2fe1c8414a550c86f
[ "Apache-2.0" ]
null
null
null
nova/api/openstack/compute/schemas/hypervisors.py
teresa-ho/stx-nova
1f82323439da2449edbbaed2fe1c8414a550c86f
[ "Apache-2.0" ]
2
2015-02-03T06:25:24.000Z
2015-02-04T10:10:36.000Z
nova/api/openstack/compute/schemas/hypervisors.py
teresa-ho/stx-nova
1f82323439da2449edbbaed2fe1c8414a550c86f
[ "Apache-2.0" ]
7
2015-01-20T10:30:08.000Z
2020-02-05T10:29:05.000Z
# Copyright 2017 Huawei Technologies Co.,LTD. # # 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 agre...
36.363636
78
0.70625
# Copyright 2017 Huawei Technologies Co.,LTD. # # 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 agre...
0
0
0
0
0
0
0
0
0
2501f6a15fea174f7089a921e75d9e41e9a71af7
6,098
py
Python
tests/graphs/synthetic/scenarios.py
pedrofreitascampospro/locintel
eb9c56cdc308660c31d90abe9fe62bd3634ba273
[ "MIT" ]
null
null
null
tests/graphs/synthetic/scenarios.py
pedrofreitascampospro/locintel
eb9c56cdc308660c31d90abe9fe62bd3634ba273
[ "MIT" ]
null
null
null
tests/graphs/synthetic/scenarios.py
pedrofreitascampospro/locintel
eb9c56cdc308660c31d90abe9fe62bd3634ba273
[ "MIT" ]
null
null
null
""" Scenarios for ODD generation/restriction of a base graph. Steps to create scenarios: 1. Define your reference graph: Add/choose graph fixture -> This is your base/reference graph, analogous to our OSM base map 2. Define your final odd graph (expected output) Restrict base graph using/adding `restricti...
34.258427
117
0.63529
""" Scenarios for ODD generation/restriction of a base graph. Steps to create scenarios: 1. Define your reference graph: Add/choose graph fixture -> This is your base/reference graph, analogous to our OSM base map 2. Define your final odd graph (expected output) Restrict base graph using/adding `restricti...
0
1,069
0
612
931
1,070
0
150
319
121b3fe06c1efda9c51df286b247a6fc0e9256d0
2,632
py
Python
sprd/vowifi/tmtc_ut/sdkut.py
deevarvar/myLab
7a5019f5f7fc11e173d350e6e2a7d2c80504782d
[ "MIT" ]
null
null
null
sprd/vowifi/tmtc_ut/sdkut.py
deevarvar/myLab
7a5019f5f7fc11e173d350e6e2a7d2c80504782d
[ "MIT" ]
null
null
null
sprd/vowifi/tmtc_ut/sdkut.py
deevarvar/myLab
7a5019f5f7fc11e173d350e6e2a7d2c80504782d
[ "MIT" ]
3
2016-10-08T15:01:49.000Z
2018-05-24T03:14:24.000Z
#-*- coding=utf-8 -*- #author: zhihua.ye@spreadtrum.com if __name__ == '__main__': sdk = Sdkut(casedir="./cases", bindir='./bin') sdk.run() sdk.dumpreport()
37.6
124
0.545593
#-*- coding=utf-8 -*- #author: zhihua.ye@spreadtrum.com import os from tmtc_ut import * from time import gmtime, strftime from lib.report import * from lib.htmlgenerator import * from lib.jinjagenerator import * class Sdkut(object): def __init__(self, casedir='', bindir=''): self.casedir = case...
0
0
0
2,270
0
0
0
24
163
e6f542beb92d58a239b6422082d785c7575ae86a
1,136
py
Python
TrEEProfiler/rrg.py
maxdy/BioTools
0240ed203ef64e2cfd637a0fd508096151df7482
[ "MIT" ]
null
null
null
TrEEProfiler/rrg.py
maxdy/BioTools
0240ed203ef64e2cfd637a0fd508096151df7482
[ "MIT" ]
null
null
null
TrEEProfiler/rrg.py
maxdy/BioTools
0240ed203ef64e2cfd637a0fd508096151df7482
[ "MIT" ]
null
null
null
import csv import os lnr_genomes_aa = [] # aa = assembly_accession with open("bacteria_as_comref_genomes_wo_ecoli",'r') as f: next(f) # skip headings reader=csv.reader(f,delimiter='\t') tmp_size = None tmp_aa = None tmp_s_id = None for line in reader: filepath = line[20].replace("/cygdrive/h/","H:/") print...
25.818182
59
0.698063
import csv import os lnr_genomes_aa = [] # aa = assembly_accession with open("bacteria_as_comref_genomes_wo_ecoli",'r') as f: next(f) # skip headings reader=csv.reader(f,delimiter='\t') tmp_size = None tmp_aa = None tmp_s_id = None for line in reader: filepath = line[20].replace("/cygdrive/h/","H:/") print...
0
0
0
0
0
0
0
0
0
2857cbb68ef20cf62c1c0b75128c6e3e01a4ca7b
286
py
Python
Python/decorators/cache.py
Suraj-Rajesh/code
3d554c4d1d5cf4bd9d084b8034641c1f6c2a47c9
[ "MIT" ]
null
null
null
Python/decorators/cache.py
Suraj-Rajesh/code
3d554c4d1d5cf4bd9d084b8034641c1f6c2a47c9
[ "MIT" ]
null
null
null
Python/decorators/cache.py
Suraj-Rajesh/code
3d554c4d1d5cf4bd9d084b8034641c1f6c2a47c9
[ "MIT" ]
null
null
null
fn(1) fn(1) fn(3)
13.619048
34
0.524476
from functools import wraps def cache(func): memo = {} @wraps(func) def wrapper(x): print 'memo: ' + str(memo) if x not in memo: memo[x] = func(x) return memo[x] return wrapper @cache def fn(x): return x + 1 fn(1) fn(1) fn(3)
0
138
0
0
0
54
0
6
68
839058cc75182dfc3372449c4c1ed12c0cb41c43
2,805
py
Python
crazyflie-lib-python/sys_test/swarm_test_rig/test_logging.py
manikamakam/swarm
3d3f4692f1969e0973fa8929660a8d0da53cafa7
[ "MIT" ]
null
null
null
crazyflie-lib-python/sys_test/swarm_test_rig/test_logging.py
manikamakam/swarm
3d3f4692f1969e0973fa8929660a8d0da53cafa7
[ "MIT" ]
null
null
null
crazyflie-lib-python/sys_test/swarm_test_rig/test_logging.py
manikamakam/swarm
3d3f4692f1969e0973fa8929660a8d0da53cafa7
[ "MIT" ]
1
2019-12-02T01:00:18.000Z
2019-12-02T01:00:18.000Z
# -*- coding: utf-8 -*- # # || ____ _ __ # +------+ / __ )(_) /_______________ _____ ___ # | 0xBC | / __ / / __/ ___/ ___/ __ `/_ / / _ \ # +------+ / /_/ / / /_/ /__/ / / /_/ / / /_/ __/ # || || /_____/_/\__/\___/_/ \__,_/ /___/\___/ # # Copyright (C) 2019 Bitcraze AB # # Th...
37.905405
79
0.688057
# -*- coding: utf-8 -*- # # || ____ _ __ # +------+ / __ )(_) /_______________ _____ ___ # | 0xBC | / __ / / __/ ___/ ___/ __ `/_ / / _ \ # +------+ / /_/ / / /_/ /__/ / / /_/ / / /_/ __/ # || || /_____/_/\__/\___/_/ \__,_/ /___/\___/ # # Copyright (C) 2019 Bitcraze AB # # Th...
0
0
0
1,378
0
0
0
171
222
3b39c3840d44cbefc3a21780e9618b88653a856d
458
py
Python
frontend_progress_bar/new_uploads/upload.py
simonfong6/micro-projects
5be195ea72ce117df6da041446f11c18e102b5df
[ "MIT" ]
null
null
null
frontend_progress_bar/new_uploads/upload.py
simonfong6/micro-projects
5be195ea72ce117df6da041446f11c18e102b5df
[ "MIT" ]
null
null
null
frontend_progress_bar/new_uploads/upload.py
simonfong6/micro-projects
5be195ea72ce117df6da041446f11c18e102b5df
[ "MIT" ]
null
null
null
from flask import Flask app = Flask(__name__) if __name__ == '__main__': app.run(debug=True)
20.818182
62
0.639738
from flask import Flask, render_template, request app = Flask(__name__) @app.route('/upload', methods=['GET', 'POST']) def upload(): if request.method == 'POST' and 'media' in request.files: return 100 return render_template('upload.html') @app.route('/upload/progress') def progress(): ...
0
251
0
0
0
0
0
26
79
fe9e6db54705ed4e0c750286b5324cb8fe1fc623
4,167
py
Python
GMOS_visualization.py
abostroem/gemini_pipeline
8ac0c6359f643b9dbc18dcbba34ba73d1750434f
[ "BSD-3-Clause" ]
null
null
null
GMOS_visualization.py
abostroem/gemini_pipeline
8ac0c6359f643b9dbc18dcbba34ba73d1750434f
[ "BSD-3-Clause" ]
null
null
null
GMOS_visualization.py
abostroem/gemini_pipeline
8ac0c6359f643b9dbc18dcbba34ba73d1750434f
[ "BSD-3-Clause" ]
null
null
null
''' Visualize steps of the calibration process to ensure everything went according to plan ''' overscan_size = 32 #pixels unusable_bottom = 48//2 #pixels
32.811024
90
0.596592
''' Visualize steps of the calibration process to ensure everything went according to plan ''' from matplotlib import pyplot as plt from astropy.io import fits from visualization import zscale #https://github.com/abostroem/utilities overscan_size = 32 #pixels unusable_bottom = 48//2 #pixels def visualize_bias(biasfi...
0
0
0
0
0
3,764
0
32
199
3edf5e6a9773f933621f46766289036db8eba0ff
246
gyp
Python
binding.gyp
SSTIA/fun-judge
010a5413642e1f28cf31ae35f2a605c0a836e859
[ "MIT" ]
null
null
null
binding.gyp
SSTIA/fun-judge
010a5413642e1f28cf31ae35f2a605c0a836e859
[ "MIT" ]
null
null
null
binding.gyp
SSTIA/fun-judge
010a5413642e1f28cf31ae35f2a605c0a836e859
[ "MIT" ]
1
2018-12-06T06:59:56.000Z
2018-12-06T06:59:56.000Z
{ "targets": [ { "target_name": "forbidden-point-finder", "sources": [ "src/binding/finder.cpp", "forbidden-point-finder/ForbiddenPointFinder.cpp" ] } ] }
22.363636
65
0.434959
{ "targets": [ { "target_name": "forbidden-point-finder", "sources": [ "src/binding/finder.cpp", "forbidden-point-finder/ForbiddenPointFinder.cpp" ] } ] }
0
0
0
0
0
0
0
0
0
32726b1cb6b6247e15672ca2217538000b322b57
8,117
py
Python
model/sda.py
urielcaire/mult
45c0cba69153442be2cee6309d46d55086445e5c
[ "Apache-2.0" ]
12
2020-10-13T01:27:35.000Z
2021-11-22T13:42:26.000Z
model/sda.py
urielcaire/mult
45c0cba69153442be2cee6309d46d55086445e5c
[ "Apache-2.0" ]
null
null
null
model/sda.py
urielcaire/mult
45c0cba69153442be2cee6309d46d55086445e5c
[ "Apache-2.0" ]
2
2020-10-12T13:40:41.000Z
2022-03-29T05:28:59.000Z
# Copyright 2020 The MuLT Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
35.757709
117
0.541456
# Copyright 2020 The MuLT Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
0
0
0
7,361
0
0
0
4
68
1a1c18495688a5d56eefb780a5845b6038590c52
1,757
py
Python
maps/maps-csv.py
vanthaiunghoa/ourBlock
c106ddc030707c91af1e4ceff6b3a6086f727d8d
[ "MIT" ]
null
null
null
maps/maps-csv.py
vanthaiunghoa/ourBlock
c106ddc030707c91af1e4ceff6b3a6086f727d8d
[ "MIT" ]
null
null
null
maps/maps-csv.py
vanthaiunghoa/ourBlock
c106ddc030707c91af1e4ceff6b3a6086f727d8d
[ "MIT" ]
1
2019-12-26T18:05:37.000Z
2019-12-26T18:05:37.000Z
from datetime import datetime import json from collections import OrderedDict import os.path from sklearn.preprocessing import MinMaxScaler import numpy as np from math import sqrt import pandas as pd data = OrderedDict() weights = [] lat = [] long = [] num_points = 500 if os.path.isfile('maps.json') : with open...
20.916667
70
0.648264
from datetime import datetime import json from collections import OrderedDict import os.path from math import log from math import e from sklearn.preprocessing import minmax_scale from sklearn.preprocessing import MinMaxScaler import numpy as np from math import sqrt import pandas as pd data = OrderedDict() weights = ...
0
0
0
0
0
0
0
21
66
06dcb38567cb606e5cd8337189d802aa2e73c189
21,003
py
Python
interpreter/code/byterun/pyvm2.py
yunkai123/my-500lines-notes
60fd3b18919b5bcb90ddece9e088c1c152438972
[ "MIT" ]
null
null
null
interpreter/code/byterun/pyvm2.py
yunkai123/my-500lines-notes
60fd3b18919b5bcb90ddece9e088c1c152438972
[ "MIT" ]
null
null
null
interpreter/code/byterun/pyvm2.py
yunkai123/my-500lines-notes
60fd3b18919b5bcb90ddece9e088c1c152438972
[ "MIT" ]
null
null
null
""" Python Python """ # # 1. pyvm2 Paul Swartz http://www.twistedmatrix.com/users/z3p/ # 2. byterun Ned Batcheldergithub.com/nedbat/byterun import collections Block = collections.namedtuple("Block", "type, handler, stack_height")
29.918803
117
0.565491
"""一个纯 Python 实现的 Python 字节码解释器""" # 改编自 # 1. pyvm2 作者:Paul Swartz,来自 http://www.twistedmatrix.com/users/z3p/ # 2. byterun 作者:Ned Batchelder,github.com/nedbat/byterun import dis, operator, sys, collections, inspect, types class Frame(object): def __init__(self, code_obj, global_names, local_names, prev_frame): ...
1,983
0
0
19,837
0
80
0
36
115
a825d0701ed6a068133819b7f8a0e257d16df555
31,029
py
Python
src/spdc_inv/utils/utils.py
EyalRozenberg1/SPDCinv
036910a94d850ade312d593b1c18c3896093b049
[ "Apache-2.0" ]
4
2021-12-11T21:05:35.000Z
2022-01-05T02:52:15.000Z
src/spdc_inv/utils/utils.py
EyalRozenberg1/SPDCinv
036910a94d850ade312d593b1c18c3896093b049
[ "Apache-2.0" ]
null
null
null
src/spdc_inv/utils/utils.py
EyalRozenberg1/SPDCinv
036910a94d850ade312d593b1c18c3896093b049
[ "Apache-2.0" ]
1
2022-01-10T17:09:53.000Z
2022-01-10T17:09:53.000Z
from typing import List, Union, Any from spdc_inv.utils.defaults import QUBIT import jax.numpy as np import math # Constants: pi = np.pi c = 2.99792458e8 # speed of light [meter/sec] eps0 = 8.854187817e-12 # vacuum permittivity [Farad/meter] h_bar = 1.054571800e-34 # [m^2 kg / s], taken from http:/...
34.476667
118
0.530053
from abc import ABC from jax.ops import index_update, index_add, index from typing import List, Union, Any from spdc_inv.utils.defaults import QUBIT import scipy.special as sp import jax.numpy as np import math # Constants: pi = np.pi c = 2.99792458e8 # speed of light [meter/sec] eps0 = 8.854187817e-1...
4
0
0
19,229
0
0
0
32
159
bd07df6570fc0aa352615daf76a0ee8b62298953
1,484
py
Python
test_scripts/test_LSST_sim.py
jakevdp/spheredb
e5e5ff8b8902459b3f38a1a413a712ac1695accc
[ "BSD-3-Clause" ]
1
2021-08-29T06:01:28.000Z
2021-08-29T06:01:28.000Z
test_scripts/test_LSST_sim.py
jakevdp/spheredb
e5e5ff8b8902459b3f38a1a413a712ac1695accc
[ "BSD-3-Clause" ]
null
null
null
test_scripts/test_LSST_sim.py
jakevdp/spheredb
e5e5ff8b8902459b3f38a1a413a712ac1695accc
[ "BSD-3-Clause" ]
2
2018-08-03T20:27:35.000Z
2021-08-29T06:01:30.000Z
""" Testing WCS projections on LSST simulation files """ import os, sys sys.path.append(os.path.abspath('..')) import numpy as np import matplotlib.pyplot as plt from spheredb.get_data import get_stripe82_file, all_lsst_exposures, get_LSST_file from spheredb.conversions import FITS_to_HPX, HPX_grid_step from sphered...
24.733333
76
0.657682
""" Testing WCS projections on LSST simulation files """ import os, sys sys.path.append(os.path.abspath('..')) import numpy as np import matplotlib.pyplot as plt from spheredb.get_data import\ get_stripe82_file, all_lsst_exposures, get_LSST_file from spheredb.conversions import FITS_to_HPX, HPX_grid_step from sp...
0
0
0
0
0
0
0
5
0
dc6f460bce02b737f3c3be063882b7ec784ca799
2,982
py
Python
tests/pytests/functional/conftest.py
GLaN1K/salt
ec1a907465c2d6dff126b747a52035e19b9a105b
[ "Apache-2.0" ]
null
null
null
tests/pytests/functional/conftest.py
GLaN1K/salt
ec1a907465c2d6dff126b747a52035e19b9a105b
[ "Apache-2.0" ]
4
2021-02-06T14:30:48.000Z
2021-12-13T20:50:10.000Z
tests/pytests/functional/conftest.py
GLaN1K/salt
ec1a907465c2d6dff126b747a52035e19b9a105b
[ "Apache-2.0" ]
1
2021-05-10T13:59:33.000Z
2021-05-10T13:59:33.000Z
import logging import salt.features import salt.loader log = logging.getLogger(__name__)
26.157895
84
0.639504
import logging import shutil import pytest import salt.features import salt.loader import salt.pillar log = logging.getLogger(__name__) class Loaders: def __init__(self, opts): self.opts = opts self.context = {} self._reset_state_funcs = [self.context.clear] self._grains = self._...
0
2,053
0
623
0
0
0
-19
228
2a064a6e84bc4fb785bd64064f8eb65382a5cafd
2,931
py
Python
using_sklearn.py
mzmmoazam/Titanic-Dataset
58704877afc3c23b88b29a575c04af09afc94af2
[ "MIT" ]
null
null
null
using_sklearn.py
mzmmoazam/Titanic-Dataset
58704877afc3c23b88b29a575c04af09afc94af2
[ "MIT" ]
null
null
null
using_sklearn.py
mzmmoazam/Titanic-Dataset
58704877afc3c23b88b29a575c04af09afc94af2
[ "MIT" ]
null
null
null
import csv import numpy as np ### I had only used numpy , as this is when I had just dived in ### this universe ### So , for beginners go search for pandas you will reduce the lines of code and it ### is awesome !! ### read data with open('../Data/train.csv') as f: reader = csv.reader(f, delimiter=',') data...
27.914286
85
0.657455
import csv import numpy as np ### I had only used numpy , as this is when I had just dived in ### this universe ### So , for beginners go search for pandas you will reduce the lines of code and it ### is awesome !! ### read data with open('../Data/train.csv') as f: reader = csv.reader(f, delimiter=',') data...
0
0
0
0
0
0
0
20
0
8453c193927c760ea206d0589cb5c1335098bc78
244
py
Python
ltime/util.py
fanjindong/ltime
c17025ceb4ed0e423162e3c302fc777fcdada7df
[ "MIT" ]
null
null
null
ltime/util.py
fanjindong/ltime
c17025ceb4ed0e423162e3c302fc777fcdada7df
[ "MIT" ]
null
null
null
ltime/util.py
fanjindong/ltime
c17025ceb4ed0e423162e3c302fc777fcdada7df
[ "MIT" ]
null
null
null
from __future__ import absolute_import
15.25
38
0.614754
from __future__ import absolute_import def is_timestamp(value): if type(value) == bool: return False try: float(value) return True except: return False def isstr(s): return isinstance(s, str)
0
0
0
0
0
157
0
0
46
b127bdb8be952e1a6b5245cf98323de492eec89b
1,653
py
Python
nanotune/model/node.py
jenshnielsen/nanotune
0f2a252d1986f9a5ff155fad626658f85aec3f3e
[ "MIT" ]
5
2021-02-24T14:32:37.000Z
2022-01-05T16:37:26.000Z
nanotune/model/node.py
jenshnielsen/nanotune
0f2a252d1986f9a5ff155fad626658f85aec3f3e
[ "MIT" ]
149
2021-03-23T14:44:39.000Z
2022-03-31T06:09:07.000Z
nanotune/model/node.py
jenshnielsen/nanotune
0f2a252d1986f9a5ff155fad626658f85aec3f3e
[ "MIT" ]
10
2021-03-29T13:36:38.000Z
2022-02-16T23:06:35.000Z
import logging logger = logging.getLogger(__name__)
23.956522
59
0.553539
import logging from typing import Optional import qcodes as qc from qcodes import Instrument, InstrumentChannel, Parameter from qcodes import validators as vals from qcodes.instrument.base import InstrumentBase from qcodes.utils.validators import Validator import nanotune as nt logger = logging.getLogger(__name__) ...
0
0
0
1,310
0
0
0
110
179
fc6aba255f9187115a00a25541285fac525573c7
8,015
py
Python
notebooks/md/data/md_equil/6KZD/md_equil.py
openkinome/study-ntrk-resistance
3c4ba64538ec55c774d34c9d7cd0a5e4665dc9d5
[ "MIT" ]
null
null
null
notebooks/md/data/md_equil/6KZD/md_equil.py
openkinome/study-ntrk-resistance
3c4ba64538ec55c774d34c9d7cd0a5e4665dc9d5
[ "MIT" ]
1
2021-07-30T15:01:53.000Z
2021-08-02T09:48:08.000Z
notebooks/md/data/md_equil/6KZD/md_equil.py
openkinome/study-ntrk-resistance
3c4ba64538ec55c774d34c9d7cd0a5e4665dc9d5
[ "MIT" ]
null
null
null
import argparse import os from sys import stdout import mdtraj as md import numpy as np import simtk.openmm as mm import simtk.openmm.app as app import simtk.unit as unit from openforcefield.topology import Molecule, Topology from openmmforcefields.generators import SystemGenerator from simtk.openmm.app import Checkpo...
33.676471
92
0.76282
import argparse import os import sys from sys import stdout import mdtraj as md import numpy as np import parmed import simtk.openmm as mm import simtk.openmm.app as app import simtk.unit as unit from openforcefield.topology import Molecule, Topology from openmmforcefields.generators import SystemGenerator from perses...
0
0
0
0
0
0
0
96
110
e215f99357e8f5180f8fadd116c52486463e20bc
910
py
Python
app/models/answerselect.py
garybake/quizmaster
f5f03b9a70823cbcd0299fc1e21f52347292d136
[ "MIT" ]
null
null
null
app/models/answerselect.py
garybake/quizmaster
f5f03b9a70823cbcd0299fc1e21f52347292d136
[ "MIT" ]
1
2021-03-23T19:18:36.000Z
2021-03-23T19:18:36.000Z
app/models/answerselect.py
garybake/quizmaster
f5f03b9a70823cbcd0299fc1e21f52347292d136
[ "MIT" ]
null
null
null
"""Holds AnswerSelect model.""" from .. import db
32.5
75
0.672527
"""Holds AnswerSelect model.""" import datetime from .. import db class AnswerSelect(db.Model): """Model to hold a users selected answers.""" __tablename__ = "answerselects" id = db.Column(db.Integer, primary_key=True) user_id = db.Column(db.Integer, db.ForeignKey("users.id")) quiz_id = db.Col...
0
0
0
818
0
0
0
-6
46
556f8642ca306c2f5a199d9fbb2db0764833a1bb
490
py
Python
src/osparc_function_services/cli.py
pcrespov/osparc-function-services
68be5bf2cad181f703488c2f358efa668f3ac3c5
[ "MIT" ]
null
null
null
src/osparc_function_services/cli.py
pcrespov/osparc-function-services
68be5bf2cad181f703488c2f358efa668f3ac3c5
[ "MIT" ]
null
null
null
src/osparc_function_services/cli.py
pcrespov/osparc-function-services
68be5bf2cad181f703488c2f358efa668f3ac3c5
[ "MIT" ]
null
null
null
import typer main = typer.Typer() if __name__ == "__main__": main()
16.333333
52
0.763265
import typer from .app import run_as_service from .sensitivity_ua_services import ( sensitivity_ua_linear_regression, sensitivity_ua_test_func, ) from .demo_services import demo_func main = typer.Typer() @main.command() def test_func(): run_as_service(sensitivity_ua_test_func) @main.command() def line...
0
164
0
0
0
0
0
112
136
a02a7d46d66be767da8b325d1fb24538b4225035
631
py
Python
engine/__init__.py
ZenithClown/DQNProjects
3a9f022166022509fce0f4306ed5612854d5539f
[ "Apache-2.0" ]
null
null
null
engine/__init__.py
ZenithClown/DQNProjects
3a9f022166022509fce0f4306ed5612854d5539f
[ "Apache-2.0" ]
null
null
null
engine/__init__.py
ZenithClown/DQNProjects
3a9f022166022509fce0f4306ed5612854d5539f
[ "Apache-2.0" ]
null
null
null
# -*- encoding: utf-8 -*- """ DeepQ Learning is a Reinforcement Learning Platform where AI Learns to Play Games In this project, I'm trying to develop some 'Q-Learning Algorithms' where the neural network will learn to play various games. The `engine` is specifically designed to build games that can be used to train ...
31.55
81
0.759113
# -*- encoding: utf-8 -*- """ DeepQ Learning is a Reinforcement Learning Platform where AI Learns to Play Games In this project, I'm trying to develop some 'Q-Learning Algorithms' where the neural network will learn to play various games. The `engine` is specifically designed to build games that can be used to train ...
0
0
0
0
0
0
0
-1
35
ef1655c61f13f3ef2c6142375d3cac6ee69db26b
623
py
Python
ocrd_utils/ocrd_utils/constants.py
wrznr/pyocrd
25c4dd8c60285b7877803e2b627d72c8c0a4ab1e
[ "Apache-2.0" ]
null
null
null
ocrd_utils/ocrd_utils/constants.py
wrznr/pyocrd
25c4dd8c60285b7877803e2b627d72c8c0a4ab1e
[ "Apache-2.0" ]
null
null
null
ocrd_utils/ocrd_utils/constants.py
wrznr/pyocrd
25c4dd8c60285b7877803e2b627d72c8c0a4ab1e
[ "Apache-2.0" ]
null
null
null
""" Constants for ocrd_utils. """ from pkg_resources import get_distribution __all__ = [ 'VERSION', 'MIMETYPE_PAGE', 'EXT_TO_MIME', 'MIME_TO_EXT' ] VERSION = get_distribution('ocrd_utils').version MIMETYPE_PAGE = 'application/vnd.prima.page+xml' EXT_TO_MIME = { '.tif': 'image/tiff', '.tiff':...
18.323529
48
0.592295
""" Constants for ocrd_utils. """ from pkg_resources import get_distribution __all__ = [ 'VERSION', 'MIMETYPE_PAGE', 'EXT_TO_MIME', 'MIME_TO_EXT' ] VERSION = get_distribution('ocrd_utils').version MIMETYPE_PAGE = 'application/vnd.prima.page+xml' EXT_TO_MIME = { '.tif': 'image/tiff', '.tiff':...
0
0
0
0
0
0
0
0
0
5ec13ba80a976c7b8c28df2901d282722275851c
3,661
py
Python
zygrader/ui/templates.py
natecraddock/zygrader
3a1d5c1dbe76c8f76c2a99f271a26b2ec873006a
[ "MIT" ]
5
2019-11-15T17:42:42.000Z
2021-04-20T19:35:25.000Z
zygrader/ui/templates.py
natecraddock/zygrader
3a1d5c1dbe76c8f76c2a99f271a26b2ec873006a
[ "MIT" ]
76
2020-02-22T01:42:16.000Z
2021-04-28T18:47:20.000Z
zygrader/ui/templates.py
cs142ta/zygrader
8ae500ced4cb6f9bcc8a2fd637d8f8dc7a8a9607
[ "MIT" ]
2
2020-02-21T04:39:38.000Z
2021-04-20T19:35:20.000Z
"""UI Templates: For reusable ui pieces built from components.""" from zygrader import ui def filename_input(purpose, text=""): """Get a valid filename from the user""" window = ui.get_window() path_input = ui.layers.PathInputLayer("Filepath Entry") path_input.set_prompt( [f"Enter the path ...
38.135417
85
0.565966
"""UI Templates: For reusable ui pieces built from components.""" from zygrader import ui from zygrader.zybooks import Zybooks class ZybookSectionSelector: def __init__(self, allow_optional_and_hidden=False): self.window = ui.get_window() self.zy_api = Zybooks() self.allow_optional_and_hi...
0
0
0
3,089
0
0
0
15
45
f21eccfc340c873b740e8a9c2712d3502fd1e059
926
py
Python
algorithms/sorting/selection_sort.py
EthanVieira/CLRS-solutions
c20bb7e4b9f26eef62bbd32caae27637e94a4a19
[ "MIT" ]
null
null
null
algorithms/sorting/selection_sort.py
EthanVieira/CLRS-solutions
c20bb7e4b9f26eef62bbd32caae27637e94a4a19
[ "MIT" ]
null
null
null
algorithms/sorting/selection_sort.py
EthanVieira/CLRS-solutions
c20bb7e4b9f26eef62bbd32caae27637e94a4a19
[ "MIT" ]
null
null
null
if __name__ == "__main__": print(selection_sort([])) print(selection_sort([1])) print(selection_sort([0, 100000000, 20000])) print(selection_sort([1, 0])) print(selection_sort([1.5, -2.6, 2, 1.1])) print(selection_sort([3, 6, 8, 1, 2, 5, 3, 9, 3, 5, 9, 2])) print(selection_sort([3, 6, -45,...
37.04
73
0.536717
def selection_sort(items: list, comparison=lambda a, b: a < b): for i in range(len(items[:-1])): index = i candidate = items[i] for j, item2 in enumerate(items[i:]): if comparison(item2, candidate): candidate = item2 index = j + i items[i]...
0
0
0
0
0
355
0
0
22
f3f7bd514a45063730bb6565c9ca529d17a83da6
1,261
py
Python
src/uvm/dap/uvm_dap.py
rodrigomelo9/uvm-python
e3127eba2cc1519a61dc6f736d862a8dcd6fce20
[ "Apache-2.0" ]
140
2020-01-18T00:14:17.000Z
2022-03-29T10:57:24.000Z
src/uvm/dap/uvm_dap.py
Mohsannaeem/uvm-python
1b8768a1358d133465ede9cadddae651664b1d53
[ "Apache-2.0" ]
24
2020-01-18T18:40:58.000Z
2021-03-25T17:39:07.000Z
src/uvm/dap/uvm_dap.py
Mohsannaeem/uvm-python
1b8768a1358d133465ede9cadddae651664b1d53
[ "Apache-2.0" ]
34
2020-01-18T12:22:59.000Z
2022-02-11T07:03:11.000Z
#// #//------------------------------------------------------------------------------ #// Copyright 2007-2011 Mentor Graphics Corporation #// Copyright 2007-2011 Cadence Design Systems, Inc. #// Copyright 2010-2011 Synopsys, Inc. #// Copyright 2013 NVIDIA Corporation #// All Rights Reserved Worldwide #/...
36.028571
81
0.613799
#// #//------------------------------------------------------------------------------ #// Copyright 2007-2011 Mentor Graphics Corporation #// Copyright 2007-2011 Cadence Design Systems, Inc. #// Copyright 2010-2011 Synopsys, Inc. #// Copyright 2013 NVIDIA Corporation #// All Rights Reserved Worldwide #/...
0
0
0
0
0
0
0
0
0
4f960221db6ab2cc64d1f2d013d6065459c08ab2
2,845
py
Python
service/houston.py
sola1993/inmoov
34e7bb6e214bd9bf3eee808c19f0ab09ec79345f
[ "Apache-2.0" ]
1
2021-02-24T17:05:52.000Z
2021-02-24T17:05:52.000Z
src/resource/Python/examples/houston.py
DarkRebel/myrobotlab
b8cf60776bdb4aef2d7dd763dfcdcf8ef99bc955
[ "Apache-2.0" ]
null
null
null
src/resource/Python/examples/houston.py
DarkRebel/myrobotlab
b8cf60776bdb4aef2d7dd763dfcdcf8ef99bc955
[ "Apache-2.0" ]
1
2020-06-03T20:48:47.000Z
2020-06-03T20:48:47.000Z
# Houston # Connects a serial device on Windows this would COMx # Sets the board type # Then starts polling analog pin 17 which is Analog pin 3 # You will need MRLComm.ino loaded on the Arduino # If all goes well - you should have 2 traces running # in the arduino->oscope tab - you can at this point connect # input - ...
33.081395
89
0.777153
# Houston # Connects a serial device on Windows this would COMx # Sets the board type # Then starts polling analog pin 17 which is Analog pin 3 # You will need MRLComm.ino loaded on the Arduino # If all goes well - you should have 2 traces running # in the arduino->oscope tab - you can at this point connect # input - ...
0
0
0
0
0
0
0
38
44
b56f79e1e64d0c4ea986e14f2491e8152330eff1
4,797
py
Python
server/run.py
S-Kantor/CS446
7453f0be2c0380a0af0d429d66690d06b659000e
[ "Apache-2.0" ]
2
2019-06-19T17:24:51.000Z
2020-01-28T02:38:06.000Z
server/run.py
S-Kantor/CS446
7453f0be2c0380a0af0d429d66690d06b659000e
[ "Apache-2.0" ]
4
2019-06-19T12:41:30.000Z
2019-07-13T03:19:56.000Z
server/run.py
S-Kantor/CS446
7453f0be2c0380a0af0d429d66690d06b659000e
[ "Apache-2.0" ]
1
2019-07-28T07:01:11.000Z
2019-07-28T07:01:11.000Z
from typing import Dict from flask import Flask from room import Room app = Flask(__name__) rooms: Dict[str, Room] = {} # Accepts datetime in milliseconds and converts to microseconds # -------------------------------------------------------- # Rooms # -------------------------------------------------------- #...
33.78169
94
0.633729
from datetime import datetime from typing import Dict from flask import Flask, request, send_file from music import BeatTimestamp, FileOffsetRecording from room import Room app = Flask(__name__) rooms: Dict[str, Room] = {} # Accepts datetime in milliseconds and converts to microseconds def parse_time(time_as_stri...
0
2,251
0
0
0
81
0
59
288
d343e0f5bb0c664e34d052bfc81a5955774763f5
295
py
Python
src/scs_dfe/interface/__init__.py
south-coast-science/scs_dfe_eng
05708b27ba65438d11fad0d947bcff3df37dc87d
[ "MIT" ]
null
null
null
src/scs_dfe/interface/__init__.py
south-coast-science/scs_dfe_eng
05708b27ba65438d11fad0d947bcff3df37dc87d
[ "MIT" ]
null
null
null
src/scs_dfe/interface/__init__.py
south-coast-science/scs_dfe_eng
05708b27ba65438d11fad0d947bcff3df37dc87d
[ "MIT" ]
2
2017-12-05T12:41:48.000Z
2019-09-29T14:41:30.000Z
""" Created on 16 Apr 2017 @author: Bruno Beloff (bruno.beloff@southcoastscience.com) """ from scs_dfe.interface.component.pca8574 import PCA8574State # -------------------------------------------------------------------------------------------------------------------- PCA8574State.init()
22.692308
118
0.461017
""" Created on 16 Apr 2017 @author: Bruno Beloff (bruno.beloff@southcoastscience.com) """ from scs_dfe.interface.component.pca8574 import PCA8574State # -------------------------------------------------------------------------------------------------------------------- PCA8574State.init()
0
0
0
0
0
0
0
0
0
750985c33cdae87f7c5dfdfc9bedf623dce189ed
28,548
py
Python
basin_setup/delineate.py
USDA-ARS-NWRC/basin_setup
8a9f661ab7897d63dda6c470cfd24f498e6e6183
[ "CC0-1.0" ]
1
2020-10-15T00:53:46.000Z
2020-10-15T00:53:46.000Z
basin_setup/delineate.py
USDA-ARS-NWRC/basin_setup
8a9f661ab7897d63dda6c470cfd24f498e6e6183
[ "CC0-1.0" ]
58
2017-12-13T23:37:12.000Z
2021-07-26T19:58:05.000Z
basin_setup/delineate.py
USDA-ARS-NWRC/basin_setup
8a9f661ab7897d63dda6c470cfd24f498e6e6183
[ "CC0-1.0" ]
null
null
null
#!/usr/bin/env python3 import datetime import os import shutil import sys from subprocess import check_output import geopandas as gpd import numpy as np from colorama import init from basin_setup import __version__ # Initialize colors init() DEBUG = False out = Messages() def check_path(filename, outfile=False...
34.271309
88
0.585855
#!/usr/bin/env python3 import argparse import datetime import os import shutil import sys import time from subprocess import check_output import geopandas as gpd import numpy as np from colorama import Fore, Style, init from basin_setup import __version__ # Initialize colors init() DEBUG = False class Messages()...
0
0
0
2,407
0
2,804
0
-3
91
8907c9f34efb220b34e310d040d510f1d54753e0
1,565
py
Python
mlxtk/tools/entropy.py
f-koehler/mlxtk
373aed06ab23ab9b70cd99e160228c50b87e939a
[ "MIT" ]
2
2018-12-21T19:41:10.000Z
2019-11-25T15:26:27.000Z
mlxtk/tools/entropy.py
f-koehler/mlxtk
373aed06ab23ab9b70cd99e160228c50b87e939a
[ "MIT" ]
73
2017-12-22T13:30:16.000Z
2022-02-22T04:21:14.000Z
mlxtk/tools/entropy.py
f-koehler/mlxtk
373aed06ab23ab9b70cd99e160228c50b87e939a
[ "MIT" ]
null
null
null
"""Compute entropy """ from typing import Union import numpy def compute_entropy( natpop: numpy.ndarray, normalize: bool = False ) -> Union[numpy.ndarray, numpy.float64]: """Compute the Boltzmann entropy from natural populations. The entropy is computed using the formula :math:`S_\\mathrm{B}=-\\sum\...
26.525424
75
0.547604
"""Compute entropy """ from typing import Union import numpy from mlxtk.log import get_logger def compute_entropy( natpop: numpy.ndarray, normalize: bool = False ) -> Union[numpy.ndarray, numpy.float64]: """Compute the Boltzmann entropy from natural populations. The entropy is computed using the formul...
0
0
0
0
0
0
0
11
23
96be032b76e4f0245c5919da7cc7fc9aa378da31
2,678
py
Python
lsassy/impacketfile.py
pretech86/lsassy
8935fb6f0829055820e1c3d79016f522d04e3b6e
[ "MIT" ]
null
null
null
lsassy/impacketfile.py
pretech86/lsassy
8935fb6f0829055820e1c3d79016f522d04e3b6e
[ "MIT" ]
null
null
null
lsassy/impacketfile.py
pretech86/lsassy
8935fb6f0829055820e1c3d79016f522d04e3b6e
[ "MIT" ]
1
2020-05-14T23:20:30.000Z
2020-05-14T23:20:30.000Z
# Author: # Romain Bentz (pixis - @hackanddo) # Website: # https://beta.hackndo.com
34.333333
155
0.584765
# Author: # Romain Bentz (pixis - @hackanddo) # Website: # https://beta.hackndo.com class ImpacketFile: def __init__(self): self._conn = None self._fpath = None self._currentOffset = 0 self._total_read = 0 self._tid = None self._fid = None self._b...
0
0
0
2,569
0
0
0
0
23
0587740f1953f3e18ed695131ebf5a181e2171cc
3,684
py
Python
validation_tests/reports/validations_produce_results.py
samcom12/anuga_core
f4378114dbf02d666fe6423de45798add5c42806
[ "Python-2.0", "OLDAP-2.7" ]
136
2015-05-07T05:47:43.000Z
2022-02-16T03:07:40.000Z
validation_tests/reports/validations_produce_results.py
samcom12/anuga_core
f4378114dbf02d666fe6423de45798add5c42806
[ "Python-2.0", "OLDAP-2.7" ]
184
2015-05-03T09:27:54.000Z
2021-12-20T04:22:48.000Z
validation_tests/reports/validations_produce_results.py
samcom12/anuga_core
f4378114dbf02d666fe6423de45798add5c42806
[ "Python-2.0", "OLDAP-2.7" ]
70
2015-03-18T07:35:22.000Z
2021-11-01T07:07:29.000Z
""" Script to run all the produce_results scripts in the validation_tests/xxx/xxx/ directories """ import os import time import anuga from anuga import indent #from anuga.validation_utilities.parameters import alg #from anuga.validation_utilities.parameters import cfl args = anuga.get_args() alg = args.alg np = arg...
23.316456
94
0.58089
""" Script to run all the produce_results scripts in the validation_tests/xxx/xxx/ directories """ import os import time import anuga from anuga import indent #from anuga.validation_utilities.parameters import alg #from anuga.validation_utilities.parameters import cfl args = anuga.get_args() alg = args.alg np = arg...
0
0
0
0
0
0
0
0
0
aee842451f6eade6db5c2978ec2bdca97f54e1b7
341
py
Python
Courses/Codeval/Easy/Python/48-MultiplyList.py
leparrav/Playground
dcb90a2dd2bc1867511cfe621eb21248a60e357f
[ "Unlicense" ]
1
2019-02-13T12:02:26.000Z
2019-02-13T12:02:26.000Z
Courses/Codeval/Easy/Python/48-MultiplyList.py
leparrav/Playground
dcb90a2dd2bc1867511cfe621eb21248a60e357f
[ "Unlicense" ]
1
2018-08-13T15:58:33.000Z
2018-08-13T15:58:33.000Z
Courses/Codeval/Easy/Python/48-MultiplyList.py
leparrav/Playground
dcb90a2dd2bc1867511cfe621eb21248a60e357f
[ "Unlicense" ]
2
2017-08-10T20:01:29.000Z
2021-07-01T08:39:13.000Z
''' https://www.codeeval.com/open_challenges/113/ ''' if __name__ == '__main__': main()
20.058824
61
0.604106
''' https://www.codeeval.com/open_challenges/113/ ''' import sys def main(): with open(sys.argv[1],'r') as word_file: for line in word_file.readlines(): line = line.strip().split("|") v1 = line[0].split() v2 = line[1].split() print " ".join([str(int(a)*int(b)) for a,b in zip(v1,v2)]) if __name__ == '...
0
0
0
0
0
213
0
-11
45
2dcd7277bafb8be6b517570230e90076a4f3dbdc
3,014
py
Python
src/vm.py
obs145628/py-calculatrice
d833307b79c01b046e82204f65334be28b1af2a0
[ "MIT" ]
null
null
null
src/vm.py
obs145628/py-calculatrice
d833307b79c01b046e82204f65334be28b1af2a0
[ "MIT" ]
null
null
null
src/vm.py
obs145628/py-calculatrice
d833307b79c01b046e82204f65334be28b1af2a0
[ "MIT" ]
null
null
null
_ntypes = 0 TYPE_VOID = add_type() TYPE_INT = add_type() TYPE_FLOAT = add_type() TYPE_STRING = add_type() TYPE_LVALUE = add_type() TYPE_FUNCTION = add_type() _funs = dict()
21.683453
85
0.618447
_ntypes = 0 def add_type(): global _ntypes res = _ntypes _ntypes += 1 return res TYPE_VOID = add_type() TYPE_INT = add_type() TYPE_FLOAT = add_type() TYPE_STRING = add_type() TYPE_LVALUE = add_type() TYPE_FUNCTION = add_type() class Value: def __init__(self, type): self.type = type cla...
0
0
0
1,712
0
839
0
0
275
14df3965a52ef794a701a973e8584d6f6bac4cc0
2,774
py
Python
Examples/ExampleScripts/PrevNextGlyph.py
andyclymer/ControlBoard
e9b56341c38b982fe22db4e40a86c6b219c85d7e
[ "MIT" ]
21
2015-03-06T12:02:18.000Z
2021-03-28T16:44:11.000Z
Examples/ExampleScripts/PrevNextGlyph.py
andyclymer/ControlBoard
e9b56341c38b982fe22db4e40a86c6b219c85d7e
[ "MIT" ]
1
2015-03-07T00:14:24.000Z
2015-03-07T00:14:24.000Z
Examples/ExampleScripts/PrevNextGlyph.py
andyclymer/ControlBoard
e9b56341c38b982fe22db4e40a86c6b219c85d7e
[ "MIT" ]
3
2015-03-06T11:36:09.000Z
2015-06-30T04:46:41.000Z
PrevNextGlyph()
40.202899
117
0.570656
from mojo.UI import CurrentGlyphWindow from mojo.events import addObserver, removeObserver import vanilla class PrevNextGlyph: """ ControlBoard "PrevNextGlyph" demo Use a Rotary Encoder component to swtich the Current Glyph Window to the previous or next glyphs. After rem...
0
0
0
2,566
0
0
0
40
89
2e4f43eef799a5742b5c04f6a152c2bae78060a5
1,871
py
Python
tests/test_simsrv.py
erikvanmulligen/etransafe-use-scenarios
6ec26120315abd66efdbfee6f5acba71e698a2b4
[ "MIT" ]
null
null
null
tests/test_simsrv.py
erikvanmulligen/etransafe-use-scenarios
6ec26120315abd66efdbfee6f5acba71e698a2b4
[ "MIT" ]
1
2021-02-11T14:59:37.000Z
2021-02-11T14:59:37.000Z
tests/test_simsrv.py
erikvanmulligen/etransafe-use-scenarios
6ec26120315abd66efdbfee6f5acba71e698a2b4
[ "MIT" ]
null
null
null
if __name__ == "__main__": main()
41.577778
103
0.603421
import pprint import argparse from src.knowledgehub.api import KnowledgeHubAPI def main(): #api = KnowledgeHubAPI(server='TEST', client_secret='39c644b3-1f23-4d94-a71f-e0fb43ebd760') api = KnowledgeHubAPI(server='DEV', client_secret='3db5a6d7-4694-48a4-8a2e-e9c30d78f9ab') #api.set_service('DEV') prin...
0
0
0
0
0
1,727
0
13
90
c62df33d10fca822c2f9f72c3c0f16c300609e0c
107
py
Python
day2/day2-05 lab1-1 multiple if.py
hajin-kim/2020-HighSchool-Python-Tutoring
352025a954bff37d21cc3d59e7d5e0f0269a1f17
[ "MIT" ]
null
null
null
day2/day2-05 lab1-1 multiple if.py
hajin-kim/2020-HighSchool-Python-Tutoring
352025a954bff37d21cc3d59e7d5e0f0269a1f17
[ "MIT" ]
null
null
null
day2/day2-05 lab1-1 multiple if.py
hajin-kim/2020-HighSchool-Python-Tutoring
352025a954bff37d21cc3d59e7d5e0f0269a1f17
[ "MIT" ]
null
null
null
num1 = int( input() ) num2 = int( input() ) if num1 > 0: if num2 > 0: print(num1, num2)
15.285714
26
0.476636
num1 = int( input() ) num2 = int( input() ) if num1 > 0: if num2 > 0: print(num1, num2)
0
0
0
0
0
0
0
0
0
f30af8b892bb64dbc6995802842d8a62372c28be
227
py
Python
PyQt5/DateTime/xmas.py
zhaokai0402/PyQt5-Study
e6280fdc615e47c947c0902836350db49441e6de
[ "MIT" ]
null
null
null
PyQt5/DateTime/xmas.py
zhaokai0402/PyQt5-Study
e6280fdc615e47c947c0902836350db49441e6de
[ "MIT" ]
null
null
null
PyQt5/DateTime/xmas.py
zhaokai0402/PyQt5-Study
e6280fdc615e47c947c0902836350db49441e6de
[ "MIT" ]
null
null
null
from PyQt5.QtCore import QDate, Qt p1 = QDate(1996, 4, 2) p2 = QDate(1994, 6, 13) dayspassed = p1.daysTo(p2) print("{0} days have passed since {1} to {2}".format(dayspassed, p1.toString(Qt.ISODate), p2.toString(Qt.ISODate)))
28.375
115
0.696035
from PyQt5.QtCore import QDate, Qt p1 = QDate(1996, 4, 2) p2 = QDate(1994, 6, 13) dayspassed = p1.daysTo(p2) print("{0} days have passed since {1} to {2}".format(dayspassed, p1.toString(Qt.ISODate), p2.toString(Qt.ISODate)))
0
0
0
0
0
0
0
0
0
8a6c28798ac5f2eea948fe552d7ed58ea3366867
12,696
py
Python
qtorch/quant/quant_function.py
drcut/QPyTorch
63c293178e8ce9e6e5b218dee96536e9c4ad1e5c
[ "MIT" ]
null
null
null
qtorch/quant/quant_function.py
drcut/QPyTorch
63c293178e8ce9e6e5b218dee96536e9c4ad1e5c
[ "MIT" ]
null
null
null
qtorch/quant/quant_function.py
drcut/QPyTorch
63c293178e8ce9e6e5b218dee96536e9c4ad1e5c
[ "MIT" ]
null
null
null
import torch from qtorch import Number, FixedPoint, BlockFloatingPoint, FloatingPoint import torch.nn as nn import torch.nn.functional as F import numpy as np from torch.utils.cpp_extension import load import os current_path = os.path.dirname(os.path.realpath(__file__)) quant_cpu = load( name='quant_cpu', ...
52.032787
172
0.632246
import torch from qtorch import Number, FixedPoint, BlockFloatingPoint, FloatingPoint import torch.nn as nn import torch.nn.functional as F import numpy as np from torch.utils.cpp_extension import load import os current_path = os.path.dirname(os.path.realpath(__file__)) quant_cpu = load( name='quant_cpu', ...
0
1,717
0
38
0
238
0
0
244
37098085de756a93d7f4495599b694d1f17420e3
797
py
Python
pylmod/tests/common.py
mitodl/PyLmod
c028ceca631c5e1032b23a4d1a8cde17450df252
[ "BSD-2-Clause" ]
4
2015-09-08T18:58:10.000Z
2018-03-06T01:14:46.000Z
pylmod/tests/common.py
mitodl/PyLmod
c028ceca631c5e1032b23a4d1a8cde17450df252
[ "BSD-2-Clause" ]
73
2015-02-12T14:44:50.000Z
2022-01-19T00:05:44.000Z
pylmod/tests/common.py
mitodl/PyLmod
c028ceca631c5e1032b23a4d1a8cde17450df252
[ "BSD-2-Clause" ]
2
2015-04-30T01:19:23.000Z
2015-08-07T07:30:08.000Z
""" Base class and common constants needed for pylmod tests """
28.464286
78
0.690088
""" Base class and common constants needed for pylmod tests """ import os from unittest import TestCase class BaseTest(TestCase): """ Base class with convenient constants and URL endpoints for pylmod testing. """ # This should be removed if we end up with common methods, but for # now they are jus...
0
0
0
669
0
0
0
-4
67
f3d331fbd5da98d5b101c7b988080ae9e54c7c8e
464
py
Python
tests/proc_006.py
meisterluk/taptaptap3
6a377ae3f6ffd92a983a7f809132c9de20ed0d76
[ "BSD-3-Clause" ]
null
null
null
tests/proc_006.py
meisterluk/taptaptap3
6a377ae3f6ffd92a983a7f809132c9de20ed0d76
[ "BSD-3-Clause" ]
2
2019-09-26T13:48:11.000Z
2019-09-30T21:30:12.000Z
tests/proc_006.py
meisterluk/taptaptap3
6a377ae3f6ffd92a983a7f809132c9de20ed0d76
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python3 from taptaptap3.proc import plan, ok, out plan(tests=10) ok("Starting the program") ok("Starting the engine") ok("Find the object") ok("Transport object to target") ok("Check for existing fire") ok("Place it beneath the desk") ok("Search for fire extinguisher") ok("Extinguish fire") ok("Put fir...
19.333333
41
0.685345
#!/usr/bin/env python3 from taptaptap3.proc import plan, ok, out plan(tests=10) ok("Starting the program") ok("Starting the engine") ok("Find the object") ok("Transport object to target") ok("Check for existing fire") ok("Place it beneath the desk") ok("Search for fire extinguisher") ok("Extinguish fire") ok("Put fir...
0
0
0
0
0
0
0
0
0
8dad65aff74ff1e8d6b5e537733be0341ed93db9
784
py
Python
tests/test_nag_max_min.py
daviddoret/pyxag
6884c7e100d28c3ce6273248caa40eaeab920bc5
[ "MIT" ]
1
2019-10-27T15:56:27.000Z
2019-10-27T15:56:27.000Z
tests/test_nag_max_min.py
daviddoret/pynag
6884c7e100d28c3ce6273248caa40eaeab920bc5
[ "MIT" ]
11
2019-11-04T18:21:16.000Z
2019-11-07T03:22:41.000Z
tests/test_nag_max_min.py
daviddoret/pynag
6884c7e100d28c3ce6273248caa40eaeab920bc5
[ "MIT" ]
null
null
null
import unittest if __name__ == '__main__': unittest.main()
35.636364
73
0.628827
import unittest from classes.nag import Nag class TestNagMaxMin(unittest.TestCase): def test_more_complex_1(self): nag = Nag('Test') nag.set_nand('i1', 'i1', 'n1') nag.set_nand('i1', 'i1', 'n2') nag.set_nand('n1', 'n2', 'n3') nag.set_nand('i1', 'n3', 'n4') nag.set_n...
0
0
0
670
0
0
0
6
45
e06289fab530f54b3cac133e2744cd2572babf70
6,475
py
Python
tests/test_extract_features.py
stjordanis/vissl
8800989f9bf073693b777c14ea01b585d4b306d6
[ "MIT" ]
1
2021-05-03T18:52:32.000Z
2021-05-03T18:52:32.000Z
tests/test_extract_features.py
pzharrington/vissl
b647c256447af7ea66655811849be1f642377db8
[ "MIT" ]
null
null
null
tests/test_extract_features.py
pzharrington/vissl
b647c256447af7ea66655811849be1f642377db8
[ "MIT" ]
null
null
null
# Copyright (c) Facebook, Inc. and its affiliates. # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree.
49.05303
88
0.592432
# Copyright (c) Facebook, Inc. and its affiliates. # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import os import unittest import torch from hydra.experimental import compose, initialize_config_module from vissl.utils.hydra_config import ...
0
5,849
0
31
0
0
0
158
259
1789f865fff7494de4353119c0d168a977ab7de7
2,178
py
Python
lab4/src/lab4_main.py
DemerzelSun12/HIT-2020-Fall-Machine-Learning-Labs
294331af274e30caab7e8c5b8f910a1654b0f54f
[ "MIT" ]
null
null
null
lab4/src/lab4_main.py
DemerzelSun12/HIT-2020-Fall-Machine-Learning-Labs
294331af274e30caab7e8c5b8f910a1654b0f54f
[ "MIT" ]
null
null
null
lab4/src/lab4_main.py
DemerzelSun12/HIT-2020-Fall-Machine-Learning-Labs
294331af274e30caab7e8c5b8f910a1654b0f54f
[ "MIT" ]
null
null
null
if __name__ == '__main__': main()
29.432432
80
0.667126
from src.PCA import * from src.generate_data import * from src.generate_picture import * from src.dimensionality_reduction_image import * def test_pca(data): generate_3_dimension_picture(data) central_data, eig_vector, data_mean = PCA(data, 2).pca() pca_data = np.dot(central_data, eig_vector) generate...
0
0
0
0
0
1,904
0
50
180
9eeabc98a8cf3c977f1c9739fce826a98ead06a5
10,652
py
Python
src/scripts/collect_pose_data_pene_no_wall_big.py
yifan-you-37/omnihang
c80b699b2cf2cf3422201cc8c3fa572d0e01d5a2
[ "MIT" ]
1
2022-01-16T20:24:09.000Z
2022-01-16T20:24:09.000Z
src/scripts/collect_pose_data_pene_no_wall_big.py
yifan-you-37/omnihang
c80b699b2cf2cf3422201cc8c3fa572d0e01d5a2
[ "MIT" ]
null
null
null
src/scripts/collect_pose_data_pene_no_wall_big.py
yifan-you-37/omnihang
c80b699b2cf2cf3422201cc8c3fa572d0e01d5a2
[ "MIT" ]
1
2022-03-16T03:14:37.000Z
2022-03-16T03:14:37.000Z
import pybullet import numpy as np # np.random.seed(5) # random.seed(5) import sys import os import argparse sys.path.insert(1, '../utils/') import bullet_client as bc sys.path.insert(1, '../lin_my/') from classifier_dataset_torch import ClassifierDataset from scipy.spatial import KDTree if __name__ == '__main__': ...
39.306273
187
0.747747
import pybullet import time import numpy as np import random # np.random.seed(5) # random.seed(5) import sys import os import argparse import csv from scipy.spatial.transform import Rotation from collect_pose_data import PoseDataCollector sys.path.insert(1, '../utils/') from coord_helper import * from data_helper im...
0
0
0
2,752
0
1,647
0
38
271