hexsha
stringlengths
40
40
size
int64
4
996k
ext
stringclasses
8 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
4
996k
avg_line_length
float64
1.33
58.2k
max_line_length
int64
2
323k
alphanum_fraction
float64
0
0.97
content_no_comment
stringlengths
0
946k
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
790b8439df274a71f1f6f1d643e546fbfd995174
1,011
py
Python
axelrod/strategies/appeaser.py
danilobellini/Axelrod
2c9212553e06095c24adcb82a5979279cbdf45fb
[ "MIT" ]
null
null
null
axelrod/strategies/appeaser.py
danilobellini/Axelrod
2c9212553e06095c24adcb82a5979279cbdf45fb
[ "MIT" ]
1
2019-01-22T09:59:52.000Z
2019-01-22T09:59:52.000Z
axelrod/strategies/appeaser.py
danilobellini/Axelrod
2c9212553e06095c24adcb82a5979279cbdf45fb
[ "MIT" ]
null
null
null
from axelrod.action import Action from axelrod.player import Player C, D = Action.C, Action.D class Appeaser(Player): """A player who tries to guess what the opponent wants. Switch the classifier every time the opponent plays D. Start with C, switch between C and D when opponent plays D. Names: ...
25.923077
68
0.575668
from axelrod.action import Action from axelrod.player import Player C, D = Action.C, Action.D class Appeaser(Player): name = "Appeaser" classifier = { "memory_depth": float("inf"), "stochastic": False, "makes_use_of": set(), "long_run_time": False, "inspects_source"...
true
true
790b8540dbd4966bf80310f8f5822def5402e059
2,216
py
Python
history/archiver_vendor.py
evandroforks/CrowdAnki
00a8ca39650f1eee2258d0d087f89600338238c1
[ "MIT" ]
null
null
null
history/archiver_vendor.py
evandroforks/CrowdAnki
00a8ca39650f1eee2258d0d087f89600338238c1
[ "MIT" ]
null
null
null
history/archiver_vendor.py
evandroforks/CrowdAnki
00a8ca39650f1eee2258d0d087f89600338238c1
[ "MIT" ]
null
null
null
from dataclasses import field, dataclass from pathlib import Path from typing import Any from .anki_deck_archiver import AnkiDeckArchiver from .archiver import AllDeckArchiver from .dulwich_repo import DulwichAnkiRepo from ..anki.adapters.deck_manager import AnkiStaticDeckManager, DeckManager from ..anki.ui.utils impo...
40.290909
121
0.678249
from dataclasses import field, dataclass from pathlib import Path from typing import Any from .anki_deck_archiver import AnkiDeckArchiver from .archiver import AllDeckArchiver from .dulwich_repo import DulwichAnkiRepo from ..anki.adapters.deck_manager import AnkiStaticDeckManager, DeckManager from ..anki.ui.utils impo...
true
true
790b85911df7f26d94219aca324a2a9839d796a7
262
py
Python
pydsge/examples/dfi_funcs.py
florabudianto/pydsge
51ea4c206e481866f92398cb573852e48fea7335
[ "MIT" ]
2
2022-02-15T10:39:24.000Z
2022-02-15T10:40:26.000Z
pydsge/examples/dfi_funcs.py
florabudianto/pydsge
51ea4c206e481866f92398cb573852e48fea7335
[ "MIT" ]
4
2021-12-31T16:27:48.000Z
2022-01-27T17:16:19.000Z
pydsge/examples/dfi_funcs.py
pcschreiber1/pydsge_OSE_Project_Fork
4222dbe187e47958d2f5b732615c9ba97547f67a
[ "MIT" ]
1
2022-02-15T10:40:32.000Z
2022-02-15T10:40:32.000Z
#!/bin/python # -*- coding: utf-8 -*- # import numpy as np # define additional functions used in the *.yaml. # Of course, as this is a trivial function you could have defined it in the *.yaml directly def calc_nu(nub): nu = nub / (1 - nub) return nu
20.153846
91
0.656489
def calc_nu(nub): nu = nub / (1 - nub) return nu
true
true
790b85930358d669705526bb084f3cd1a21e0745
5,375
py
Python
procuratorate/dataocean_judger.py
diudiu/featurefactory
ee02ad9e3ea66e2eeafe6e11859801f0420c7d9e
[ "MIT" ]
null
null
null
procuratorate/dataocean_judger.py
diudiu/featurefactory
ee02ad9e3ea66e2eeafe6e11859801f0420c7d9e
[ "MIT" ]
null
null
null
procuratorate/dataocean_judger.py
diudiu/featurefactory
ee02ad9e3ea66e2eeafe6e11859801f0420c7d9e
[ "MIT" ]
null
null
null
# -*- coding:utf-8 -*- """ Copyright (c) 2013-2016 SYPH, All Rights Reserved. ----------------------------------------------------------- Author: S.JunPeng Date: 2016/12/22 Change Activity: """ import logging import json from vendor.utils.encrypt import Cryption from apps.common.models import Clie...
39.814815
117
0.596093
import logging import json from vendor.utils.encrypt import Cryption from apps.common.models import ClientOverview from apps.remote.models import FeatureFieldRel from apps.etl.context import ApplyContext from vendor.errors.api_errors import * logger = logging.getLogger('apps.featureapi') class Judger(object): ...
true
true
790b8927e288ae6d7dde5a943d6d44cbaa5191de
17,915
py
Python
src/models/block_mixture_gp_softmax.py
jp2011/spatial-poisson-mixtures
9e535a636e710a9fa146cbbd4613ece70ec90791
[ "MIT" ]
3
2020-06-18T10:57:47.000Z
2022-03-07T12:13:04.000Z
src/models/block_mixture_gp_softmax.py
jp2011/spatial-poisson-mixtures
9e535a636e710a9fa146cbbd4613ece70ec90791
[ "MIT" ]
null
null
null
src/models/block_mixture_gp_softmax.py
jp2011/spatial-poisson-mixtures
9e535a636e710a9fa146cbbd4613ece70ec90791
[ "MIT" ]
null
null
null
import logging import os import pickle import sys from pathlib import Path import click import matplotlib.pyplot as plt import numpy as np import pandas as pd import zsampler from dotenv import load_dotenv, find_dotenv from scipy.special import logsumexp, softmax from src.inference.context_geo import GridContextGeo, ...
43.801956
122
0.561708
import logging import os import pickle import sys from pathlib import Path import click import matplotlib.pyplot as plt import numpy as np import pandas as pd import zsampler from dotenv import load_dotenv, find_dotenv from scipy.special import logsumexp, softmax from src.inference.context_geo import GridContextGeo, ...
true
true
790b89703b3e2dfa5ed76b30a81ee851ae89b036
48,850
py
Python
supar/parsers/dep.py
LiBinNLP/HOSDP
f0806d1c27c9d5233002836e1825a1567891d928
[ "MIT" ]
4
2022-01-28T18:32:54.000Z
2022-02-07T08:31:35.000Z
supar/parsers/dep.py
LiBinNLP/HOSDP
f0806d1c27c9d5233002836e1825a1567891d928
[ "MIT" ]
null
null
null
supar/parsers/dep.py
LiBinNLP/HOSDP
f0806d1c27c9d5233002836e1825a1567891d928
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import os import torch import torch.nn as nn from supar.models import (BiaffineDependencyModel, CRF2oDependencyModel, CRFDependencyModel, VIDependencyModel) from supar.parsers.parser import Parser from supar.utils import Config, Dataset, Embedding from supar.utils.com...
45.484171
126
0.555988
import os import torch import torch.nn as nn from supar.models import (BiaffineDependencyModel, CRF2oDependencyModel, CRFDependencyModel, VIDependencyModel) from supar.parsers.parser import Parser from supar.utils import Config, Dataset, Embedding from supar.utils.common import BOS, PAD, UN...
true
true
790b89af260321ccc15fa02ebd7012c038573d0b
1,456
py
Python
pyvisdk/do/virtual_machine_runtime_info.py
Infinidat/pyvisdk
f2f4e5f50da16f659ccc1d84b6a00f397fa997f8
[ "MIT" ]
null
null
null
pyvisdk/do/virtual_machine_runtime_info.py
Infinidat/pyvisdk
f2f4e5f50da16f659ccc1d84b6a00f397fa997f8
[ "MIT" ]
null
null
null
pyvisdk/do/virtual_machine_runtime_info.py
Infinidat/pyvisdk
f2f4e5f50da16f659ccc1d84b6a00f397fa997f8
[ "MIT" ]
null
null
null
import logging from pyvisdk.exceptions import InvalidArgumentError ######################################## # Automatically generated, do not edit. ######################################## log = logging.getLogger(__name__) def VirtualMachineRuntimeInfo(vim, *args, **kwargs): '''The RuntimeInfo data object type ...
38.315789
124
0.644231
import logging from pyvisdk.exceptions import InvalidArgumentError
true
true
790b89f0bbbe8f19e33245d054a82e4e97f904d5
7,302
py
Python
src/otoole/preprocess/narrow_to_datafile.py
chrwm/otoole
f527eb1fdf75cc6872457a6e5145f678f5d34693
[ "MIT" ]
null
null
null
src/otoole/preprocess/narrow_to_datafile.py
chrwm/otoole
f527eb1fdf75cc6872457a6e5145f678f5d34693
[ "MIT" ]
null
null
null
src/otoole/preprocess/narrow_to_datafile.py
chrwm/otoole
f527eb1fdf75cc6872457a6e5145f678f5d34693
[ "MIT" ]
null
null
null
import logging import sys from abc import abstractmethod from typing import TextIO import pandas as pd from datapackage import Package from pandas_datapackage_reader import read_datapackage from sqlalchemy import create_engine from otoole import read_packaged_file logger = logging.getLogger(__name__) class DataPac...
30.425
92
0.598877
import logging import sys from abc import abstractmethod from typing import TextIO import pandas as pd from datapackage import Package from pandas_datapackage_reader import read_datapackage from sqlalchemy import create_engine from otoole import read_packaged_file logger = logging.getLogger(__name__) class DataPac...
true
true
790b8a83c0629355a24ed8c345356bc43a56f144
55,886
py
Python
src/prefect/client/client.py
zmac12/prefect
7fe55a83f275a01d95268ff9e4bd5f5b349728e1
[ "Apache-2.0" ]
null
null
null
src/prefect/client/client.py
zmac12/prefect
7fe55a83f275a01d95268ff9e4bd5f5b349728e1
[ "Apache-2.0" ]
null
null
null
src/prefect/client/client.py
zmac12/prefect
7fe55a83f275a01d95268ff9e4bd5f5b349728e1
[ "Apache-2.0" ]
null
null
null
import datetime import json import os import re import time import uuid import warnings from pathlib import Path from typing import TYPE_CHECKING, Any, Dict, List, NamedTuple, Optional, Union from urllib.parse import urljoin # if simplejson is installed, `requests` defaults to using it instead of json # this allows th...
35.985834
101
0.55071
import datetime import json import os import re import time import uuid import warnings from pathlib import Path from typing import TYPE_CHECKING, Any, Dict, List, NamedTuple, Optional, Union from urllib.parse import urljoin try: from simplejson.errors import JSONDecodeError except ImportError: from json.dec...
true
true
790b8abf7f9381e65335a4c3075421b84e923688
2,238
py
Python
darknet_model_client.py
gouchicao/darknet-serving
0024570ca2c3ec12866e3523e18975dc7e3ab836
[ "MIT" ]
8
2019-06-23T21:05:52.000Z
2020-10-31T02:41:27.000Z
darknet_model_client.py
gouchicao/darknet-serving
0024570ca2c3ec12866e3523e18975dc7e3ab836
[ "MIT" ]
null
null
null
darknet_model_client.py
gouchicao/darknet-serving
0024570ca2c3ec12866e3523e18975dc7e3ab836
[ "MIT" ]
null
null
null
from __future__ import print_function import random import logging import argparse import grpc import object_detection_pb2 import object_detection_pb2_grpc BLOCK_SIZE = 40000 class ImageDataBlockRequestIterable(object): def __init__(self, img_data): self.data = img_data self.pos = 0 def ...
27.62963
118
0.637623
from __future__ import print_function import random import logging import argparse import grpc import object_detection_pb2 import object_detection_pb2_grpc BLOCK_SIZE = 40000 class ImageDataBlockRequestIterable(object): def __init__(self, img_data): self.data = img_data self.pos = 0 def ...
true
true
790b8acbfbb77b067f3c0226ae098a5107f695a3
732
py
Python
talosblockchain/global_tests/test_udprpc_server.py
chunchuan-wang/droplet-engine
5c2dbac90aa3bde837ed4989ecd78235e5d9ef8e
[ "Apache-2.0" ]
10
2020-10-14T14:22:20.000Z
2022-03-16T11:33:14.000Z
talosblockchain/global_tests/test_udprpc_server.py
chunchuan-wang/droplet-engine
5c2dbac90aa3bde837ed4989ecd78235e5d9ef8e
[ "Apache-2.0" ]
null
null
null
talosblockchain/global_tests/test_udprpc_server.py
chunchuan-wang/droplet-engine
5c2dbac90aa3bde837ed4989ecd78235e5d9ef8e
[ "Apache-2.0" ]
4
2020-08-30T12:40:40.000Z
2021-08-03T15:27:12.000Z
#© 2017-2020, ETH Zurich, D-INFK, lubu@inf.ethz.ch from rpcudp.protocol import RPCProtocol from twisted.internet import reactor from talosstorage.checks import QueryToken from talosstorage.chunkdata import CloudChunk class RPCServer(RPCProtocol): # Any methods starting with "rpc_" are available to clients. ...
36.6
125
0.726776
from rpcudp.protocol import RPCProtocol from twisted.internet import reactor from talosstorage.checks import QueryToken from talosstorage.chunkdata import CloudChunk class RPCServer(RPCProtocol): def rpc_sayhi(self, sender, chunk, token): token = QueryToken.from_json(token) chunk_...
true
true
790b8b3a9ab7ad264f6469a95ecd011e62f74329
11,096
py
Python
distributed/cli/dask_worker.py
deniederhut/distributed
b83edbef74a1718d62e51a9cee0379b7617048e1
[ "BSD-3-Clause" ]
26
2015-09-09T11:35:47.000Z
2020-06-14T18:36:50.000Z
distributed/cli/dask_worker.py
deniederhut/distributed
b83edbef74a1718d62e51a9cee0379b7617048e1
[ "BSD-3-Clause" ]
19
2015-10-07T19:25:55.000Z
2019-06-06T20:40:24.000Z
distributed/cli/dask_worker.py
deniederhut/distributed
b83edbef74a1718d62e51a9cee0379b7617048e1
[ "BSD-3-Clause" ]
8
2015-10-22T21:23:09.000Z
2019-07-12T14:09:17.000Z
import atexit import logging import multiprocessing import gc import os from sys import exit import warnings import click import dask from distributed import Nanny, Worker from distributed.security import Security from distributed.cli.utils import check_python_3, install_signal_handlers from distributed.comm import ge...
26.997567
95
0.62518
import atexit import logging import multiprocessing import gc import os from sys import exit import warnings import click import dask from distributed import Nanny, Worker from distributed.security import Security from distributed.cli.utils import check_python_3, install_signal_handlers from distributed.comm import ge...
true
true
790b8b7bc539f6f7b41ca4ac7e89a16d7889de2b
21,029
py
Python
tests/reflection.py
Abhishek5101/peewee
bc4ada143a1e5e8a92af22d40a02bcd41e14c1bf
[ "MIT" ]
1
2019-03-09T05:08:56.000Z
2019-03-09T05:08:56.000Z
tests/reflection.py
Abhishek5101/peewee
bc4ada143a1e5e8a92af22d40a02bcd41e14c1bf
[ "MIT" ]
null
null
null
tests/reflection.py
Abhishek5101/peewee
bc4ada143a1e5e8a92af22d40a02bcd41e14c1bf
[ "MIT" ]
null
null
null
import datetime import os import re from peewee import * from playhouse.reflection import * from .base import IS_SQLITE_OLD from .base import ModelTestCase from .base import TestModel from .base import db from .base import requires_models from .base import requires_sqlite from .base import skip_if from .base_models i...
35.283557
79
0.567169
import datetime import os import re from peewee import * from playhouse.reflection import * from .base import IS_SQLITE_OLD from .base import ModelTestCase from .base import TestModel from .base import db from .base import requires_models from .base import requires_sqlite from .base import skip_if from .base_models i...
true
true
790b8bcb2e61535fc042fec9fe81c76d4f11fe74
4,968
py
Python
goal_prox/envs/fetch/custom_push.py
clvrai/goal_prox_il
7c809b2ee575a69a14997068db06f3c1f3c8bd08
[ "MIT" ]
4
2021-11-17T20:19:34.000Z
2022-03-31T04:21:26.000Z
goal_prox/envs/fetch/custom_push.py
clvrai/goal_prox_il
7c809b2ee575a69a14997068db06f3c1f3c8bd08
[ "MIT" ]
null
null
null
goal_prox/envs/fetch/custom_push.py
clvrai/goal_prox_il
7c809b2ee575a69a14997068db06f3c1f3c8bd08
[ "MIT" ]
null
null
null
import os from gym import utils from gym.envs.robotics import fetch_env import numpy as np from goal_prox.envs.holdout_sampler import HoldoutSampler, LineHoldoutSampler from goal_prox.envs.old_holdout_sampler import OldHoldoutSampler # Ensure we get the path separator correct on windows MODEL_XML_PATH = os.path.join(...
38.8125
100
0.636675
import os from gym import utils from gym.envs.robotics import fetch_env import numpy as np from goal_prox.envs.holdout_sampler import HoldoutSampler, LineHoldoutSampler from goal_prox.envs.old_holdout_sampler import OldHoldoutSampler MODEL_XML_PATH = os.path.join('fetch', 'push.xml') Y_NOISE = 0.02 X_NOISE = 0.05 O...
true
true
790b8e1a27e92a8bb8302238f047680e367050f9
1,380
py
Python
scripts/File.py
tanvirtin/Cloud-Backup
751c3e7ac4419729f25183e5dcb9fa4d230556ed
[ "MIT" ]
4
2017-04-17T23:40:43.000Z
2020-04-24T03:31:56.000Z
scripts/File.py
tanvirtin/Google-Drive-File-System-Synchronization-with-Ubuntu
751c3e7ac4419729f25183e5dcb9fa4d230556ed
[ "MIT" ]
null
null
null
scripts/File.py
tanvirtin/Google-Drive-File-System-Synchronization-with-Ubuntu
751c3e7ac4419729f25183e5dcb9fa4d230556ed
[ "MIT" ]
null
null
null
''' Class Name: File Purpose: The purpose of this class is represent data of a particular file in a file system. ''' class File: def __init__(self, name = None, directory = None, date = None, fId = None, folderId = None, extension = ""): self.__name = name self.__directory = directory self.__date = date ...
23
109
0.717391
class File: def __init__(self, name = None, directory = None, date = None, fId = None, folderId = None, extension = ""): self.__name = name self.__directory = directory self.__date = date self.__id = fId self.__folderId = folderId self.__mimeType = extension def __repr__(self): return self.getName @pr...
true
true
790b8e49c61be79832743ad5b30bc3222f22bcf8
34,574
py
Python
openmdao/utils/general_utils.py
andrewellis55/OpenMDAO
390956b787c22805e126145f0358b79fad54af47
[ "Apache-2.0" ]
null
null
null
openmdao/utils/general_utils.py
andrewellis55/OpenMDAO
390956b787c22805e126145f0358b79fad54af47
[ "Apache-2.0" ]
10
2019-12-31T19:15:07.000Z
2022-03-31T23:00:21.000Z
openmdao/utils/general_utils.py
DKilkenny/OpenMDAO
d01fd526e71add4a203b7d32c534e1eab07dafaf
[ "Apache-2.0" ]
null
null
null
"""Some miscellaneous utility functions.""" from contextlib import contextmanager import os import re import sys import warnings import unittest from fnmatch import fnmatchcase from io import StringIO from numbers import Number # note: this is a Python 3.3 change, clean this up for OpenMDAO 3.x try: from collectio...
27.180818
97
0.607161
from contextlib import contextmanager import os import re import sys import warnings import unittest from fnmatch import fnmatchcase from io import StringIO from numbers import Number try: from collections.abc import Iterable except ImportError: from collections import Iterable import numbers import numpy a...
true
true
790b8ed7a9d90b116983f2c1e6805773324e94d8
909
py
Python
twlived/events.py
tausackhn/twlived
e065fe5efc479ad2ec0ee0053994cba857e39ae2
[ "MIT" ]
11
2017-04-11T13:09:36.000Z
2021-11-27T22:14:34.000Z
twlived/events.py
tausackhn/twlived
e065fe5efc479ad2ec0ee0053994cba857e39ae2
[ "MIT" ]
1
2017-09-07T10:29:53.000Z
2017-09-07T16:01:01.000Z
twlived/events.py
tausackhn/twlived
e065fe5efc479ad2ec0ee0053994cba857e39ae2
[ "MIT" ]
1
2021-04-15T16:07:58.000Z
2021-04-15T16:07:58.000Z
from pydantic import BaseModel from .utils import BaseEvent class MainPublisherEvent(BaseEvent): pass class CheckStatus(MainPublisherEvent): channel: str class WaitLiveVideo(MainPublisherEvent): pass class WaitStream(MainPublisherEvent): time: int class DownloaderEvent(BaseEvent): pass ...
16.232143
53
0.733773
from pydantic import BaseModel from .utils import BaseEvent class MainPublisherEvent(BaseEvent): pass class CheckStatus(MainPublisherEvent): channel: str class WaitLiveVideo(MainPublisherEvent): pass class WaitStream(MainPublisherEvent): time: int class DownloaderEvent(BaseEvent): pass ...
true
true
790b8f0decceafeb9f1f47457358a8dcf0fa3542
237
py
Python
05_tcp_ip_tricks/Sniffer Detection.py
mumbo-pro/network-penetration
30fcc70a0bdb094e2339951785d4d72b0373a71f
[ "MIT" ]
3
2020-07-25T13:36:02.000Z
2021-06-03T19:59:13.000Z
05_tcp_ip_tricks/Sniffer Detection.py
mumbo-pro/understanding-network-hacks
30fcc70a0bdb094e2339951785d4d72b0373a71f
[ "MIT" ]
null
null
null
05_tcp_ip_tricks/Sniffer Detection.py
mumbo-pro/understanding-network-hacks
30fcc70a0bdb094e2339951785d4d72b0373a71f
[ "MIT" ]
2
2019-07-12T10:04:23.000Z
2019-07-18T17:57:59.000Z
ifconfig -a | grep PROMISC cat /var/log/messages |grep promisc 1 #!/usr/bin/python 2 3 import sys 4 from scapy.all import promiscping 5 6 if len(sys.argv) < 2: 7 print sys.argv[0] + " <net>" 8 sys.exit() 9 10 promiscping(sys.argv[1])
47.4
171
0.691983
ifconfig -a | grep PROMISC cat /var/log/messages |grep promisc 1
false
true
790b8fb7a4fa3fba8749496732d8f5fe914da627
905
py
Python
OpenCV-Computer-Vision-Examples-with-Python-A-Complete-Guide-for-Dummies-master/Source Code/opencv/Affine Transformation/shearing.py
Payal197bhadra/ComputerVision
d66b5037ece99b6189dd4306b2c9be67cffd14af
[ "MIT" ]
null
null
null
OpenCV-Computer-Vision-Examples-with-Python-A-Complete-Guide-for-Dummies-master/Source Code/opencv/Affine Transformation/shearing.py
Payal197bhadra/ComputerVision
d66b5037ece99b6189dd4306b2c9be67cffd14af
[ "MIT" ]
null
null
null
OpenCV-Computer-Vision-Examples-with-Python-A-Complete-Guide-for-Dummies-master/Source Code/opencv/Affine Transformation/shearing.py
Payal197bhadra/ComputerVision
d66b5037ece99b6189dd4306b2c9be67cffd14af
[ "MIT" ]
null
null
null
import cv2 import matplotlib.pyplot as plt import numpy as np img= cv2.imread("img.png") img=cv2.cvtColor(img, cv2.COLOR_BGR2RGB) plt.axis('off') # show the image plt.imshow(img) plt.show() # get the image shape rows, cols, dim = img.shape rows, cols, dim = img.shape # transformation matrix for Shearing # shearing app...
27.424242
76
0.658564
import cv2 import matplotlib.pyplot as plt import numpy as np img= cv2.imread("img.png") img=cv2.cvtColor(img, cv2.COLOR_BGR2RGB) plt.axis('off') plt.imshow(img) plt.show() rows, cols, dim = img.shape rows, cols, dim = img.shape M1 = np.float32([[1, 0.5, 0], [0, 1 , 0], [0, 0 , 1]]) M...
true
true
790b8fbd0e53a9a03d4b620835dbc1a50bfd23cc
6,553
py
Python
datameta_client_lib/model/staged_meta_data_sets.py
ghga-de/datameta-client-lib
85c8900c26d092a929db6c5b0bd6b89cdea9a176
[ "Apache-2.0" ]
null
null
null
datameta_client_lib/model/staged_meta_data_sets.py
ghga-de/datameta-client-lib
85c8900c26d092a929db6c5b0bd6b89cdea9a176
[ "Apache-2.0" ]
1
2021-03-15T18:42:36.000Z
2021-03-15T18:42:36.000Z
datameta_client_lib/model/staged_meta_data_sets.py
ghga-de/datameta-client-lib
85c8900c26d092a929db6c5b0bd6b89cdea9a176
[ "Apache-2.0" ]
null
null
null
""" DataMeta DataMeta # noqa: E501 The version of the OpenAPI document: 1.4.0 Contact: leon.kuchenbecker@uni-tuebingen.de Generated by: https://openapi-generator.tech """ import re # noqa: F401 import sys # noqa: F401 from datameta_client_lib.model_utils import ( # noqa: F401 ApiTypeErr...
38.321637
110
0.584923
import re import sys from datameta_client_lib.model_utils import ( ApiTypeError, ModelComposed, ModelNormal, ModelSimple, cached_property, change_keys_js_to_python, convert_js_args_to_python_args, date, datetime, file_type, none_type, validate_get_composed_info, ...
true
true
790b907d340166b927df243cbe28d86d3deb503e
25,162
py
Python
src/bot.py
SergeyKonnov/walbot
28923523299bd18b47074915c8209833683d0b8c
[ "MIT" ]
null
null
null
src/bot.py
SergeyKonnov/walbot
28923523299bd18b47074915c8209833683d0b8c
[ "MIT" ]
null
null
null
src/bot.py
SergeyKonnov/walbot
28923523299bd18b47074915c8209833683d0b8c
[ "MIT" ]
null
null
null
import asyncio import datetime import importlib import itertools import os import random import re import shutil import signal import subprocess import sys import time import zipfile import discord import psutil from src import const from src.algorithms import levenshtein_distance from src.bc import DoNotUpdateFlag f...
46.596296
118
0.604443
import asyncio import datetime import importlib import itertools import os import random import re import shutil import signal import subprocess import sys import time import zipfile import discord import psutil from src import const from src.algorithms import levenshtein_distance from src.bc import DoNotUpdateFlag f...
true
true
790b908662cae9042a56ea78e88cdb535fd5fe3b
8,577
py
Python
test/testutils.py
idoby/SimpleParsing
ed8170a32e7765bd98ed42831a428f0cdb645b67
[ "MIT" ]
null
null
null
test/testutils.py
idoby/SimpleParsing
ed8170a32e7765bd98ed42831a428f0cdb645b67
[ "MIT" ]
null
null
null
test/testutils.py
idoby/SimpleParsing
ed8170a32e7765bd98ed42831a428f0cdb645b67
[ "MIT" ]
null
null
null
import shlex import string import sys from contextlib import contextmanager from typing import Any, Callable, Generic, List, Optional, Tuple, Type, TypeVar, cast import pytest import simple_parsing from simple_parsing import ConflictResolution, DashVariant, ParsingError from simple_parsing.utils import camel_case fro...
33.767717
104
0.670164
import shlex import string import sys from contextlib import contextmanager from typing import Any, Callable, Generic, List, Optional, Tuple, Type, TypeVar, cast import pytest import simple_parsing from simple_parsing import ConflictResolution, DashVariant, ParsingError from simple_parsing.utils import camel_case fro...
true
true
790b90b30d402f9cc6bdb0c0b8cce8daf19fb973
7,732
py
Python
test/functional/abandonconflict.py
youngseoka/youngseokcoin_half
ae63c8ec8e94d19197c3c365a436d70a22a0cfeb
[ "MIT" ]
null
null
null
test/functional/abandonconflict.py
youngseoka/youngseokcoin_half
ae63c8ec8e94d19197c3c365a436d70a22a0cfeb
[ "MIT" ]
1
2020-05-21T00:57:53.000Z
2020-05-21T00:57:53.000Z
test/functional/abandonconflict.py
youngseoka/youngseokcoin_half
ae63c8ec8e94d19197c3c365a436d70a22a0cfeb
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2014-2016 The Youngseokcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test the abandontransaction RPC. The abandontransaction RPC marks a transaction and all its in-...
48.628931
137
0.662442
from test_framework.test_framework import YoungseokcoinTestFramework from test_framework.util import * class AbandonConflictTest(YoungseokcoinTestFramework): def set_test_params(self): self.num_nodes = 2 self.extra_args = [["-minrelaytxfee=0.00001"], []] def run_test(self): self.no...
true
true
790b91273bac667d95710a4535755a287da3ae43
5,444
py
Python
camper/twit/models.py
drinks/camper
82d9f1342886d91bf6787c1bcdb1a7cb62e53ca3
[ "BSD-3-Clause" ]
null
null
null
camper/twit/models.py
drinks/camper
82d9f1342886d91bf6787c1bcdb1a7cb62e53ca3
[ "BSD-3-Clause" ]
null
null
null
camper/twit/models.py
drinks/camper
82d9f1342886d91bf6787c1bcdb1a7cb62e53ca3
[ "BSD-3-Clause" ]
null
null
null
from django.db import models from django.template.defaultfilters import truncatechars from django.utils import timezone from camper.sked.models import Event, Session from camper.twit.threads import SendTweetThread class TweetTooLongError(Exception): def __init__(self, msg=None): self.msg = msg if...
30.58427
96
0.560434
from django.db import models from django.template.defaultfilters import truncatechars from django.utils import timezone from camper.sked.models import Event, Session from camper.twit.threads import SendTweetThread class TweetTooLongError(Exception): def __init__(self, msg=None): self.msg = msg if...
true
true
790b9400e23a410d37cd19c544b89676d2c7a2ae
1,319
py
Python
beanborg/bb_mover.py
StefanD986/beanborg
5578b8e6f68deb3f7cf0c7e5fce396f681fe99bc
[ "BSD-2-Clause" ]
null
null
null
beanborg/bb_mover.py
StefanD986/beanborg
5578b8e6f68deb3f7cf0c7e5fce396f681fe99bc
[ "BSD-2-Clause" ]
null
null
null
beanborg/bb_mover.py
StefanD986/beanborg
5578b8e6f68deb3f7cf0c7e5fce396f681fe99bc
[ "BSD-2-Clause" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- __copyright__ = "Copyright (C) 2021 Luciano Fiandesio" __license__ = "GNU GPLv2" import argparse import os import sys import glob import yaml from config import * from arg_parser import * def main(): args = eval_args('Move bank csv file to processing folder') ...
27.479167
126
0.648976
__copyright__ = "Copyright (C) 2021 Luciano Fiandesio" __license__ = "GNU GPLv2" import argparse import os import sys import glob import yaml from config import * from arg_parser import * def main(): args = eval_args('Move bank csv file to processing folder') config = init_config(args.file, args.debu...
true
true
790b940ed96894b131d6fbb1b7bb18fae26e8fdf
3,245
py
Python
salt/transport/__init__.py
otrempe/salt
28d3ecc261f3528a830ae60b715469f2894123df
[ "Apache-2.0" ]
null
null
null
salt/transport/__init__.py
otrempe/salt
28d3ecc261f3528a830ae60b715469f2894123df
[ "Apache-2.0" ]
null
null
null
salt/transport/__init__.py
otrempe/salt
28d3ecc261f3528a830ae60b715469f2894123df
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- ''' Encapsulate the different transports available to Salt. Currently this is only ZeroMQ. ''' import salt.payload import salt.auth class Channel(object): @staticmethod def factory(opts, **kwargs): # Default to ZeroMQ for now ttype = 'zeromq' if 'transport_ty...
33.453608
89
0.589522
import salt.payload import salt.auth class Channel(object): @staticmethod def factory(opts, **kwargs): ttype = 'zeromq' if 'transport_type' in opts: ttype = opts['transport_type'] elif 'transport_type' in opts.get('pillar', {}).get('master', {}): tty...
true
true
790b949f5954819ff37e1d8839a955e82e4336d0
6,918
py
Python
playback/templates/linuxbridge_agent_ini.py
jiasir/playback
58b2a5d669dcfaa8cad50c544a4b068dcacf9b69
[ "MIT" ]
6
2015-05-09T10:39:54.000Z
2017-07-02T21:19:42.000Z
playback/templates/linuxbridge_agent_ini.py
jiasir/playback
58b2a5d669dcfaa8cad50c544a4b068dcacf9b69
[ "MIT" ]
20
2015-06-10T05:02:42.000Z
2022-03-29T21:54:07.000Z
playback/templates/linuxbridge_agent_ini.py
jiasir/playback
58b2a5d669dcfaa8cad50c544a4b068dcacf9b69
[ "MIT" ]
6
2015-03-25T06:13:38.000Z
2016-04-08T02:22:05.000Z
conf_linuxbridge_agent_ini = """[DEFAULT] # # From oslo.log # # If set to true, the logging level will be set to DEBUG instead of the default # INFO level. (boolean value) #debug = false # If set to false, the logging level will be set to WARNING instead of the # default INFO level. (boolean value) # This option is ...
42.703704
414
0.775513
conf_linuxbridge_agent_ini = """[DEFAULT] # # From oslo.log # # If set to true, the logging level will be set to DEBUG instead of the default # INFO level. (boolean value) #debug = false # If set to false, the logging level will be set to WARNING instead of the # default INFO level. (boolean value) # This option is ...
true
true
790b94a900934e0ad8a2a66407e25cbac9504749
2,233
py
Python
src/data/prepare_dataset.py
vinodrajendran001/aerial_segmentation
44ce909fe1f6f218930c50825ce7452c8029b20f
[ "FTL" ]
null
null
null
src/data/prepare_dataset.py
vinodrajendran001/aerial_segmentation
44ce909fe1f6f218930c50825ce7452c8029b20f
[ "FTL" ]
10
2021-03-30T14:17:16.000Z
2022-03-12T00:50:30.000Z
src/data/prepare_dataset.py
vinodrajendran001/aerial_segmentation
44ce909fe1f6f218930c50825ce7452c8029b20f
[ "FTL" ]
null
null
null
# -*- coding: utf-8 -*- import os from glob import glob import json import random import shutil if __name__ == '__main__': ROOT_DIR = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) #prepare dataset with open(os.path.join(ROOT_DIR, 'config.json')) as json_file: c...
31.9
98
0.673086
import os from glob import glob import json import random import shutil if __name__ == '__main__': ROOT_DIR = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) with open(os.path.join(ROOT_DIR, 'config.json')) as json_file: config = json.load(json_file) train...
true
true
790b955027ed9a346ae2c965e9a7544530060b67
1,019
py
Python
cli/actions/factory.py
daneshvar-amrollahi/polar
b72254e1a8354e6a10135cd3990b8edfda02559e
[ "MIT" ]
1
2021-11-14T05:52:21.000Z
2021-11-14T05:52:21.000Z
cli/actions/factory.py
daneshvar-amrollahi/polar
b72254e1a8354e6a10135cd3990b8edfda02559e
[ "MIT" ]
null
null
null
cli/actions/factory.py
daneshvar-amrollahi/polar
b72254e1a8354e6a10135cd3990b8edfda02559e
[ "MIT" ]
null
null
null
from argparse import Namespace from .simulation_action import Action, SimulationAction from .plot_action import PlotAction from .gram_charlier_action import GramCharlierAction from .cornish_fisher_action import CornishFisherAction from .mc_combination_action import MCCombinationAction from .print_benchmark_action impor...
35.137931
58
0.747792
from argparse import Namespace from .simulation_action import Action, SimulationAction from .plot_action import PlotAction from .gram_charlier_action import GramCharlierAction from .cornish_fisher_action import CornishFisherAction from .mc_combination_action import MCCombinationAction from .print_benchmark_action impor...
true
true
790b955bc79139bf552cbd934667ff270d4d1e1c
12,479
py
Python
run/cmu_runner.py
Droliven/MSRGCN
5d8d8e3365d3b23ca2ac734ace7e84135a6e3a9e
[ "MIT" ]
28
2021-08-21T12:02:12.000Z
2022-03-07T03:54:55.000Z
run/cmu_runner.py
Droliven/MSRGCN
5d8d8e3365d3b23ca2ac734ace7e84135a6e3a9e
[ "MIT" ]
6
2021-09-07T03:05:51.000Z
2022-02-24T03:00:04.000Z
run/cmu_runner.py
Droliven/MSRGCN
5d8d8e3365d3b23ca2ac734ace7e84135a6e3a9e
[ "MIT" ]
6
2021-08-21T12:02:16.000Z
2021-11-22T14:22:57.000Z
#!/usr/bin/env python # encoding: utf-8 ''' @project : MSRGCN @file : cmu_runner.py @author : Droliven @contact : droliven@163.com @ide : PyCharm @time : 2021-07-28 13:29 ''' from datas import CMUMotionDataset, get_dct_matrix, reverse_dct_torch, define_actions_cmu, draw_pic_gt_pred from nets import MSRGCN,...
45.378182
215
0.550845
from datas import CMUMotionDataset, get_dct_matrix, reverse_dct_torch, define_actions_cmu, draw_pic_gt_pred from nets import MSRGCN, MSRGCNShortTerm from configs.config import Config from torch.utils.data import DataLoader import torch.optim as optim import torch import os from tensorboardX import SummaryWriter im...
true
true
790b956f7ead17c423bc56f87db6ed89fe0cd3ba
12,598
py
Python
dfirtrack_config/tests/status/test_status_views.py
cclauss/dfirtrack
2a307c5fe82e927b3c229a20a02bc0c7a5d66d9a
[ "Apache-2.0" ]
null
null
null
dfirtrack_config/tests/status/test_status_views.py
cclauss/dfirtrack
2a307c5fe82e927b3c229a20a02bc0c7a5d66d9a
[ "Apache-2.0" ]
null
null
null
dfirtrack_config/tests/status/test_status_views.py
cclauss/dfirtrack
2a307c5fe82e927b3c229a20a02bc0c7a5d66d9a
[ "Apache-2.0" ]
null
null
null
import urllib.parse from datetime import datetime from unittest.mock import patch from django.contrib.auth.models import User from django.test import TestCase from django.utils import timezone from dfirtrack_artifacts.models import ( Artifact, Artifactpriority, Artifactstatus, Artifacttype, ) from dfi...
39.993651
147
0.658358
import urllib.parse from datetime import datetime from unittest.mock import patch from django.contrib.auth.models import User from django.test import TestCase from django.utils import timezone from dfirtrack_artifacts.models import ( Artifact, Artifactpriority, Artifactstatus, Artifacttype, ) from dfi...
true
true
790b95b3e36688282051a17cf920d4427b26a9d5
12,225
py
Python
salt/states/reg.py
shaktigupta200/salt
a5f43a5e247ee9c23852db2d21d40df8712ceb43
[ "Apache-2.0", "MIT" ]
null
null
null
salt/states/reg.py
shaktigupta200/salt
a5f43a5e247ee9c23852db2d21d40df8712ceb43
[ "Apache-2.0", "MIT" ]
null
null
null
salt/states/reg.py
shaktigupta200/salt
a5f43a5e247ee9c23852db2d21d40df8712ceb43
[ "Apache-2.0", "MIT" ]
null
null
null
# -*- coding: utf-8 -*- r''' Manage the Windows registry =========================== Many python developers think of registry keys as if they were python keys in a dictionary which is not the case. The windows registry is broken down into the following components: ----- Hives ----- This is the top level of the regis...
32.427056
117
0.594438
from __future__ import absolute_import, print_function, unicode_literals import logging import salt.utils.stringutils log = logging.getLogger(__name__) def __virtual__(): if 'reg.read_value' not in __utils__: return (False, 'reg state module failed to load: ' 'missing module fun...
true
true
790b968633cd30fabb38efed4a47431142e77aa1
3,185
py
Python
temboo/core/Library/Stripe/Coupons/RetrieveCoupon.py
jordanemedlock/psychtruths
52e09033ade9608bd5143129f8a1bfac22d634dd
[ "Apache-2.0" ]
7
2016-03-07T02:07:21.000Z
2022-01-21T02:22:41.000Z
temboo/core/Library/Stripe/Coupons/RetrieveCoupon.py
jordanemedlock/psychtruths
52e09033ade9608bd5143129f8a1bfac22d634dd
[ "Apache-2.0" ]
null
null
null
temboo/core/Library/Stripe/Coupons/RetrieveCoupon.py
jordanemedlock/psychtruths
52e09033ade9608bd5143129f8a1bfac22d634dd
[ "Apache-2.0" ]
8
2016-06-14T06:01:11.000Z
2020-04-22T09:21:44.000Z
# -*- coding: utf-8 -*- ############################################################################### # # RetrieveCoupon # Retrieves a coupon with specified coupon id. # # Python versions 2.6, 2.7, 3.x # # Copyright 2014, Temboo Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not u...
36.193182
138
0.686656
true
true
790b96fdcab1c24d8db48f0feb9a15c6ae07321a
1,006
py
Python
marvin/command_router.py
bennyandresen/marvin-mk2
71463df161489dcef62b7abd54018c9eca66216f
[ "MIT" ]
16
2020-06-16T20:49:33.000Z
2022-02-09T03:38:54.000Z
marvin/command_router.py
bennyandresen/marvin-mk2
71463df161489dcef62b7abd54018c9eca66216f
[ "MIT" ]
76
2020-06-06T22:45:02.000Z
2022-03-24T21:28:56.000Z
marvin/command_router.py
bennyandresen/marvin-mk2
71463df161489dcef62b7abd54018c9eca66216f
[ "MIT" ]
11
2020-06-07T12:50:44.000Z
2022-02-09T03:38:15.000Z
import re from typing import Any from typing import Awaitable from typing import Callable from typing import Dict from typing import List class CommandRouter: def __init__(self, subrouters: List["CommandRouter"] = []) -> None: self.command_handlers: Dict[str, Callable[..., Awaitable[Any]]] = dict() ...
32.451613
80
0.637177
import re from typing import Any from typing import Awaitable from typing import Callable from typing import Dict from typing import List class CommandRouter: def __init__(self, subrouters: List["CommandRouter"] = []) -> None: self.command_handlers: Dict[str, Callable[..., Awaitable[Any]]] = dict() ...
true
true
790b97ed689e2dc900e9189fe8b09bbac3d3f114
12,772
py
Python
drone_2.py
SVJayanthi/DroneSimulation
8fe52609cb367360729f16f4f6402faeadaf6b06
[ "MIT" ]
1
2019-06-19T02:22:58.000Z
2019-06-19T02:22:58.000Z
drone_2.py
SVJayanthi/DroneTrafficSimulation
8fe52609cb367360729f16f4f6402faeadaf6b06
[ "MIT" ]
null
null
null
drone_2.py
SVJayanthi/DroneTrafficSimulation
8fe52609cb367360729f16f4f6402faeadaf6b06
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Sun Mar 10 22:59:51 2019 @author: Sravan """ # -*- coding: utf-8 -*- """ Created on Thu Feb 14 22:36:21 2019 @author: Sravan """ import csv import numpy as np from scipy.spatial.distance import pdist, squareform, euclidean, cdist import matplotlib.pyplot as plt import mpl_tool...
37.127907
116
0.432509
import csv import numpy as np from scipy.spatial.distance import pdist, squareform, euclidean, cdist import matplotlib.pyplot as plt import mpl_toolkits.mplot3d.axes3d as p3 import scipy.integrate as integrate import matplotlib.animation as animation class ParticleBox: def __init__(self, dron...
true
true
790b97f05b63919ea246766fc8126cb5b6fdd78c
959
py
Python
tests/sig_return_type/test.py
ujway/serverless-go
11cf5c422ef93b5fbe1acfbc7a8d6e25e33072e2
[ "Apache-2.0" ]
864
2017-01-03T15:30:14.000Z
2020-01-01T17:34:25.000Z
tests/sig_return_type/test.py
ujway/serverless-go
11cf5c422ef93b5fbe1acfbc7a8d6e25e33072e2
[ "Apache-2.0" ]
52
2017-01-09T21:11:30.000Z
2018-07-25T10:41:56.000Z
tests/sig_return_type/test.py
ujway/serverless-go
11cf5c422ef93b5fbe1acfbc7a8d6e25e33072e2
[ "Apache-2.0" ]
76
2017-01-04T12:19:37.000Z
2019-12-28T17:40:35.000Z
# # Copyright 2017 Alsanium, SAS. or its affiliates. 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 require...
28.205882
92
0.727842
import unittest import handler class Context: def get_remaining_time_in_millis(self): pass def log(self): pass class TestCase(unittest.TestCase): def test_case(self): with self.assertRaisesRegexp(AttributeError, "runtime: symbol Handle is not valid"): ...
true
true
790b98bfc338ce0fcac8e7ea7e6c6d58c8e25f87
14,795
py
Python
dacbench/envs/sgd.py
goktug97/DACBench
953bc8efacdb993889b223110e25f7e453c86b2d
[ "Apache-2.0" ]
1
2021-02-05T16:18:56.000Z
2021-02-05T16:18:56.000Z
dacbench/envs/sgd.py
goktug97/DACBench
953bc8efacdb993889b223110e25f7e453c86b2d
[ "Apache-2.0" ]
null
null
null
dacbench/envs/sgd.py
goktug97/DACBench
953bc8efacdb993889b223110e25f7e453c86b2d
[ "Apache-2.0" ]
null
null
null
import math import warnings from functools import reduce import numpy as np import torch from backpack import backpack, extend from backpack.extensions import BatchGrad from gym.utils import seeding from torchvision import datasets, transforms from dacbench import AbstractEnv warnings.filterwarnings("ignore") clas...
31.41189
100
0.59973
import math import warnings from functools import reduce import numpy as np import torch from backpack import backpack, extend from backpack.extensions import BatchGrad from gym.utils import seeding from torchvision import datasets, transforms from dacbench import AbstractEnv warnings.filterwarnings("ignore") clas...
true
true
790b98c472cbe416f8e5c877f7e9519df3d4f93a
4,364
py
Python
contrib/seeds/generate-seeds.py
26rahulsingh/wuazi
ca3f34333ac63f6270692820bf11ca1a360472be
[ "MIT" ]
null
null
null
contrib/seeds/generate-seeds.py
26rahulsingh/wuazi
ca3f34333ac63f6270692820bf11ca1a360472be
[ "MIT" ]
null
null
null
contrib/seeds/generate-seeds.py
26rahulsingh/wuazi
ca3f34333ac63f6270692820bf11ca1a360472be
[ "MIT" ]
null
null
null
#!/usr/bin/python # Copyright (c) 2014 Wladimir J. van der Laan # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. ''' Script to generate list of seed nodes for chainparams.cpp. This script expects two text files in the directory tha...
31.395683
98
0.581118
from __future__ import print_function, division from base64 import b32decode from binascii import a2b_hex import sys, os import re pchIPv4 = bytearray([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0xff, 0xff]) pchOnionCat = bytearray([0xFD,0x87,0xD8,0x7E,0xEB,0x43]) def name_to_ipv6(addr): if len(addr)>6 and addr.endswith...
true
true
790b98d76451003e9355d48a63c424cb1e65400f
6,415
py
Python
google/ads/google_ads/v3/proto/services/campaign_criterion_simulation_service_pb2.py
jphanwebstaurant/google-ads-python
600812b2afcc4d57f00b47dfe436620ce50bfe9b
[ "Apache-2.0" ]
1
2019-11-30T23:42:39.000Z
2019-11-30T23:42:39.000Z
google/ads/google_ads/v3/proto/services/campaign_criterion_simulation_service_pb2.py
jphanwebstaurant/google-ads-python
600812b2afcc4d57f00b47dfe436620ce50bfe9b
[ "Apache-2.0" ]
null
null
null
google/ads/google_ads/v3/proto/services/campaign_criterion_simulation_service_pb2.py
jphanwebstaurant/google-ads-python
600812b2afcc4d57f00b47dfe436620ce50bfe9b
[ "Apache-2.0" ]
1
2020-09-30T17:04:06.000Z
2020-09-30T17:04:06.000Z
# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/ads/googleads_v3/proto/services/campaign_criterion_simulation_service.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor fro...
56.769912
1,247
0.833983
import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database _sym_db ...
true
true
790b99b056afe3a626533ebe8e9f5d288f652b02
3,533
py
Python
infer.py
jomavera/DRL_HFV
043e32805ec79fd35281b864659c194d7b89f5bc
[ "MIT" ]
114
2020-02-12T08:55:11.000Z
2022-02-28T02:05:30.000Z
infer.py
jomavera/DRL_HFV
043e32805ec79fd35281b864659c194d7b89f5bc
[ "MIT" ]
null
null
null
infer.py
jomavera/DRL_HFV
043e32805ec79fd35281b864659c194d7b89f5bc
[ "MIT" ]
6
2020-02-14T19:25:30.000Z
2021-10-04T14:54:00.000Z
import numpy as np from env import Env from models import PolicyNet, Critic from utils import one_hot import torch from torch.optim import Adam import time import os from datetime import datetime import math device = torch.device('cuda:0' if torch.cuda.is_available() else 'cpu') #------------------------SET PARAMETE...
33.018692
109
0.589301
import numpy as np from env import Env from models import PolicyNet, Critic from utils import one_hot import torch from torch.optim import Adam import time import os from datetime import datetime import math device = torch.device('cuda:0' if torch.cuda.is_available() else 'cpu') SEED = 17 BATCH_SIZE ...
true
true
790b99b7c8510d3b99bd51ef86e99adaa01fb768
183
py
Python
modules/isrunning.py
ShaderLight/autochampselect
b7d346cc99011b5f84867f3a01dc2e8d815c05d7
[ "MIT" ]
null
null
null
modules/isrunning.py
ShaderLight/autochampselect
b7d346cc99011b5f84867f3a01dc2e8d815c05d7
[ "MIT" ]
null
null
null
modules/isrunning.py
ShaderLight/autochampselect
b7d346cc99011b5f84867f3a01dc2e8d815c05d7
[ "MIT" ]
null
null
null
from subprocess import check_output def isrunning(processName): tasklist = check_output('tasklist', shell=False) tasklist = str(tasklist) return(processName in tasklist)
26.142857
52
0.759563
from subprocess import check_output def isrunning(processName): tasklist = check_output('tasklist', shell=False) tasklist = str(tasklist) return(processName in tasklist)
true
true
790b9a86278c650b398b522e03eac34f482469c7
9,608
py
Python
python/tests/kat/t_redirect.py
imoisharma/emissary
5346ccb06673827a6a2e51ddaf92925f60bd9de9
[ "Apache-2.0" ]
3,438
2017-04-23T23:10:18.000Z
2021-06-02T10:11:45.000Z
python/tests/kat/t_redirect.py
imoisharma/emissary
5346ccb06673827a6a2e51ddaf92925f60bd9de9
[ "Apache-2.0" ]
1,906
2017-04-11T17:47:54.000Z
2021-06-02T14:20:11.000Z
python/tests/kat/t_redirect.py
imoisharma/emissary
5346ccb06673827a6a2e51ddaf92925f60bd9de9
[ "Apache-2.0" ]
591
2017-04-17T17:50:08.000Z
2021-06-01T08:20:34.000Z
from kat.harness import Query, EDGE_STACK from abstract_tests import AmbassadorTest, HTTP from abstract_tests import ServiceType from selfsigned import TLSCerts from kat.utils import namespace_manifest ##### # XXX This file is annoying. # # RedirectTestsWithProxyProto and RedirectTestsInvalidSecret used to be subcla...
31.398693
127
0.658097
from kat.harness import Query, EDGE_STACK from abstract_tests import AmbassadorTest, HTTP from abstract_tests import ServiceType from selfsigned import TLSCerts from kat.utils import namespace_manifest way to subclass an AmbassadorTest without having your base class be run separately, which isn't class RedirectTe...
true
true
790b9aabc2f6f1044efc0d8b453c3efab8b0f977
15,595
py
Python
scope/timecourse/base_handler.py
drew-sinha/rpc-scope
268864097b5b7d123a842f216adc446ec6b32d01
[ "MIT" ]
null
null
null
scope/timecourse/base_handler.py
drew-sinha/rpc-scope
268864097b5b7d123a842f216adc446ec6b32d01
[ "MIT" ]
null
null
null
scope/timecourse/base_handler.py
drew-sinha/rpc-scope
268864097b5b7d123a842f216adc446ec6b32d01
[ "MIT" ]
null
null
null
# This code is licensed under the MIT License (see LICENSE file for details) import concurrent.futures as futures import contextlib import inspect import json import logging import pathlib import platform import sys import time from zplib import datafile from zplib.image import threaded_io from elegant import load_da...
47.837423
122
0.648092
import concurrent.futures as futures import contextlib import inspect import json import logging import pathlib import platform import sys import time from zplib import datafile from zplib.image import threaded_io from elegant import load_data from ..util import log_util from ..util import timer class DummyIO: ...
true
true
790b9cc97da09add8657988561a1ac0078875952
1,006
py
Python
kubernetes/test/test_v1_scale_io_volume_source.py
iguazio/python
c2684bb479d44a49a2010ec4ede5ffa7b17349dd
[ "Apache-2.0" ]
null
null
null
kubernetes/test/test_v1_scale_io_volume_source.py
iguazio/python
c2684bb479d44a49a2010ec4ede5ffa7b17349dd
[ "Apache-2.0" ]
null
null
null
kubernetes/test/test_v1_scale_io_volume_source.py
iguazio/python
c2684bb479d44a49a2010ec4ede5ffa7b17349dd
[ "Apache-2.0" ]
1
2019-01-10T11:13:52.000Z
2019-01-10T11:13:52.000Z
# coding: utf-8 """ Kubernetes No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: v1.13.1 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import os import sys i...
22.355556
105
0.72167
from __future__ import absolute_import import os import sys import unittest import kubernetes.client from kubernetes.client.rest import ApiException from kubernetes.client.models.v1_scale_io_volume_source import V1ScaleIOVolumeSource class TestV1ScaleIOVolumeSource(unittest.TestCase): def setUp(self): ...
true
true
790b9e3ac9ec40ba33c3ccf65d54b2efa218272e
3,459
py
Python
fibers/_pyfibers.py
timgates42/python-fibers
e96200d1bd058fb3e5931f37af68b2e18f3043d5
[ "MIT" ]
null
null
null
fibers/_pyfibers.py
timgates42/python-fibers
e96200d1bd058fb3e5931f37af68b2e18f3043d5
[ "MIT" ]
null
null
null
fibers/_pyfibers.py
timgates42/python-fibers
e96200d1bd058fb3e5931f37af68b2e18f3043d5
[ "MIT" ]
null
null
null
import _continuation import threading __all__ = ['Fiber', 'error', 'current'] _tls = threading.local() def current(): try: return _tls.current_fiber except AttributeError: fiber = _tls.current_fiber = _tls.main_fiber = _create_main_fiber() return fiber class error(Exception): ...
27.895161
85
0.603643
import _continuation import threading __all__ = ['Fiber', 'error', 'current'] _tls = threading.local() def current(): try: return _tls.current_fiber except AttributeError: fiber = _tls.current_fiber = _tls.main_fiber = _create_main_fiber() return fiber class error(Exception): ...
true
true
790b9f2574998fa91c56aa8a6f4266c340e79a8d
2,076
py
Python
01/Task13.py
omartrinidad/pattern-recognition-bit
ba3eb4e541fff2b1aedbaa4420d7a8cea8100dc7
[ "MIT" ]
null
null
null
01/Task13.py
omartrinidad/pattern-recognition-bit
ba3eb4e541fff2b1aedbaa4420d7a8cea8100dc7
[ "MIT" ]
null
null
null
01/Task13.py
omartrinidad/pattern-recognition-bit
ba3eb4e541fff2b1aedbaa4420d7a8cea8100dc7
[ "MIT" ]
null
null
null
import numpy as np import scipy as sp import matplotlib.pyplot as plt import matplotlib.mlab as mlab def updateParams(k, alpha, N,sum_log_di, x, h): div_xByAlpha = np.divide(x,alpha) powK_div_xByAlpha = np.power(div_xByAlpha, k) log_div_xByAlpha = np.log(div_xByAlpha) sum_powK_div_diByAlpha = np.sum(...
37.071429
143
0.663776
import numpy as np import scipy as sp import matplotlib.pyplot as plt import matplotlib.mlab as mlab def updateParams(k, alpha, N,sum_log_di, x, h): div_xByAlpha = np.divide(x,alpha) powK_div_xByAlpha = np.power(div_xByAlpha, k) log_div_xByAlpha = np.log(div_xByAlpha) sum_powK_div_diByAlpha = np.sum(...
false
true
790b9f9c2a8e69ff060dcb45c97227164ad46f3d
12,145
py
Python
evaluate.py
TUM-LMF/fieldRNN
5e9e17b170fe000ae15a73a276742aea84e6410b
[ "MIT" ]
42
2017-09-02T12:49:26.000Z
2021-06-23T09:31:04.000Z
evaluate.py
TUM-LMF/fieldRNN
5e9e17b170fe000ae15a73a276742aea84e6410b
[ "MIT" ]
4
2019-03-20T08:19:45.000Z
2022-02-09T23:53:03.000Z
evaluate.py
TUM-LMF/fieldRNN
5e9e17b170fe000ae15a73a276742aea84e6410b
[ "MIT" ]
17
2018-03-09T03:38:44.000Z
2021-08-21T17:37:21.000Z
import tensorflow as tf import cPickle as pickle import rnn_model import cnn_model from dataloader import Dataloader import os import datetime import numpy as np import argparse from cnn_model import unroll def main(): parser = argparse.ArgumentParser(description='Evaluate .') parser.add_argument('rundir', ty...
41.309524
192
0.594566
import tensorflow as tf import cPickle as pickle import rnn_model import cnn_model from dataloader import Dataloader import os import datetime import numpy as np import argparse from cnn_model import unroll def main(): parser = argparse.ArgumentParser(description='Evaluate .') parser.add_argument('rundir', ty...
true
true
790b9fa31288bce41760b4441d82b587c8002969
12,478
py
Python
transformers/__init__.py
seongwookchun/transformers
9b3817259020ae8fc3e310f7eea896413826a526
[ "Apache-2.0" ]
null
null
null
transformers/__init__.py
seongwookchun/transformers
9b3817259020ae8fc3e310f7eea896413826a526
[ "Apache-2.0" ]
null
null
null
transformers/__init__.py
seongwookchun/transformers
9b3817259020ae8fc3e310f7eea896413826a526
[ "Apache-2.0" ]
null
null
null
__version__ = "2.2.3" # Work around to update TensorFlow's absl.logging threshold which alters the # default Python logging output behavior when present. # see: https://github.com/abseil/abseil-py/issues/99 # and: https://github.com/tensorflow/tensorflow/issues/26691#issuecomment-500369493 try: import absl.logging...
59.990385
128
0.677432
__version__ = "2.2.3" # default Python logging output behavior when present. # see: https://github.com/abseil/abseil-py/issues/99 # and: https://github.com/tensorflow/tensorflow/issues/26691#issuecomment-500369493 try: import absl.logging absl.logging.set_verbosity('info') absl.logging.set_stderrthreshold...
true
true
790b9fb1483e1de5093e122f612049f94fddc227
1,862
py
Python
modules/crawler/DatasetProcessing/OBSAZENIMISTNOSTI_processor.py
kivzcu/heatmap.zcu
526c4df9c1c299eb1b3e9df6bd2be5578d462405
[ "MIT" ]
null
null
null
modules/crawler/DatasetProcessing/OBSAZENIMISTNOSTI_processor.py
kivzcu/heatmap.zcu
526c4df9c1c299eb1b3e9df6bd2be5578d462405
[ "MIT" ]
null
null
null
modules/crawler/DatasetProcessing/OBSAZENIMISTNOSTI_processor.py
kivzcu/heatmap.zcu
526c4df9c1c299eb1b3e9df6bd2be5578d462405
[ "MIT" ]
null
null
null
from Utilities.CSV import csv_data_line from Utilities import date_formating import logging from datetime import date import time import datetime from shared_types import DateDict logging.basicConfig(filename='../../CrawlerLogs' + 'Crawlerlog-' + date.today().strftime("%b-%Y") + '.log', ...
29.09375
96
0.575188
from Utilities.CSV import csv_data_line from Utilities import date_formating import logging from datetime import date import time import datetime from shared_types import DateDict logging.basicConfig(filename='../../CrawlerLogs' + 'Crawlerlog-' + date.today().strftime("%b-%Y") + '.log', ...
true
true
790ba23a1f89d392c6c4402663883408927c5005
1,812
py
Python
ambari-server/src/main/resources/stacks/HDP/2.5/services/IMPALA/package/scripts/impala-state-store.py
cas-packone/ambari-chs
68033fbd4b810b6642853f2ad9128cbbd4e0cb7b
[ "Apache-2.0" ]
3
2019-06-20T11:49:36.000Z
2020-12-11T10:44:29.000Z
ambari-server/src/main/resources/stacks/HDP/2.5/services/IMPALA/package/scripts/impala-state-store.py
cas-packone/ambari-chs
68033fbd4b810b6642853f2ad9128cbbd4e0cb7b
[ "Apache-2.0" ]
null
null
null
ambari-server/src/main/resources/stacks/HDP/2.5/services/IMPALA/package/scripts/impala-state-store.py
cas-packone/ambari-chs
68033fbd4b810b6642853f2ad9128cbbd4e0cb7b
[ "Apache-2.0" ]
1
2019-03-20T08:36:17.000Z
2019-03-20T08:36:17.000Z
import sys, os, pwd, signal, time from resource_management import * from resource_management.core.base import Fail from resource_management.core.exceptions import ComponentIsNotRunning from subprocess import call from impala_base import ImpalaBase class StateStore(ImpalaBase): #Call setup.sh to install the service...
31.789474
85
0.63521
import sys, os, pwd, signal, time from resource_management import * from resource_management.core.base import Fail from resource_management.core.exceptions import ComponentIsNotRunning from subprocess import call from impala_base import ImpalaBase class StateStore(ImpalaBase): def install(self, env): ...
true
true
790ba29310674e8c543daa342a1ff8b866b509f8
401
py
Python
output/models/nist_data/atomic/g_year_month/schema_instance/nistschema_sv_iv_atomic_g_year_month_enumeration_5_xsd/__init__.py
tefra/xsdata-w3c-tests
b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f
[ "MIT" ]
1
2021-08-14T17:59:21.000Z
2021-08-14T17:59:21.000Z
output/models/nist_data/atomic/g_year_month/schema_instance/nistschema_sv_iv_atomic_g_year_month_enumeration_5_xsd/__init__.py
tefra/xsdata-w3c-tests
b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f
[ "MIT" ]
4
2020-02-12T21:30:44.000Z
2020-04-15T20:06:46.000Z
output/models/nist_data/atomic/g_year_month/schema_instance/nistschema_sv_iv_atomic_g_year_month_enumeration_5_xsd/__init__.py
tefra/xsdata-w3c-tests
b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f
[ "MIT" ]
null
null
null
from output.models.nist_data.atomic.g_year_month.schema_instance.nistschema_sv_iv_atomic_g_year_month_enumeration_5_xsd.nistschema_sv_iv_atomic_g_year_month_enumeration_5 import ( NistschemaSvIvAtomicGYearMonthEnumeration5, NistschemaSvIvAtomicGYearMonthEnumeration5Type, ) __all__ = [ "NistschemaSvIvAtomic...
40.1
179
0.875312
from output.models.nist_data.atomic.g_year_month.schema_instance.nistschema_sv_iv_atomic_g_year_month_enumeration_5_xsd.nistschema_sv_iv_atomic_g_year_month_enumeration_5 import ( NistschemaSvIvAtomicGYearMonthEnumeration5, NistschemaSvIvAtomicGYearMonthEnumeration5Type, ) __all__ = [ "NistschemaSvIvAtomic...
true
true
790ba2ea6ec025cbc3de4e69fc78f8ea5e36e0a8
433
py
Python
modoboa/transport/api/v2/tests.py
suryatmodulus/modoboa
f8164a9bbe1e5bfa7f1a1f8813a3790ebf3397ee
[ "ISC" ]
null
null
null
modoboa/transport/api/v2/tests.py
suryatmodulus/modoboa
f8164a9bbe1e5bfa7f1a1f8813a3790ebf3397ee
[ "ISC" ]
null
null
null
modoboa/transport/api/v2/tests.py
suryatmodulus/modoboa
f8164a9bbe1e5bfa7f1a1f8813a3790ebf3397ee
[ "ISC" ]
null
null
null
"""API v2 tests.""" from django.urls import reverse from modoboa.lib.tests import ModoAPITestCase class TransportViewSetTestCase(ModoAPITestCase): def test_list(self): url = reverse("v2:transport-list") resp = self.client.get(url) self.assertEqual(resp.status_code, 200) backends...
25.470588
54
0.672055
from django.urls import reverse from modoboa.lib.tests import ModoAPITestCase class TransportViewSetTestCase(ModoAPITestCase): def test_list(self): url = reverse("v2:transport-list") resp = self.client.get(url) self.assertEqual(resp.status_code, 200) backends = resp.json() ...
true
true
790ba3c7b2e94de8a1eba66cde239879c2f7ca94
5,717
py
Python
tests/kafkatest/tests/client/message_format_change_test.py
1810824959/kafka
bb1ef567b44208e63459ca6f9db0654d867d7e7e
[ "Apache-2.0" ]
null
null
null
tests/kafkatest/tests/client/message_format_change_test.py
1810824959/kafka
bb1ef567b44208e63459ca6f9db0654d867d7e7e
[ "Apache-2.0" ]
null
null
null
tests/kafkatest/tests/client/message_format_change_test.py
1810824959/kafka
bb1ef567b44208e63459ca6f9db0654d867d7e7e
[ "Apache-2.0" ]
null
null
null
# Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the Li...
55.504854
128
0.682526
from ducktape.mark import parametrize from ducktape.utils.util import wait_until from ducktape.mark.resource import cluster from kafkatest.services.console_consumer import ConsoleConsumer from kafkatest.services.kafka import KafkaService from kafkatest.services.verifiable_producer import VerifiableProducer...
true
true
790ba657f9b5e772aa7a7bec79f73aa71250de33
1,498
py
Python
jenkins/tagging/tagging.py
athiruma/cloud-governance
0515975090046266bce70990e4e269ae6ab03296
[ "Apache-2.0" ]
null
null
null
jenkins/tagging/tagging.py
athiruma/cloud-governance
0515975090046266bce70990e4e269ae6ab03296
[ "Apache-2.0" ]
1
2022-02-02T17:38:05.000Z
2022-02-02T17:38:05.000Z
jenkins/tagging/tagging.py
athiruma/cloud-governance
0515975090046266bce70990e4e269ae6ab03296
[ "Apache-2.0" ]
null
null
null
import os AWS_ACCESS_KEY_ID_PERF = os.environ['AWS_ACCESS_KEY_ID_PERF'] AWS_SECRET_ACCESS_KEY_PERF = os.environ['AWS_SECRET_ACCESS_KEY_PERF'] AWS_ACCESS_KEY_ID_DELETE_PERF = os.environ['AWS_ACCESS_KEY_ID_DELETE_PERF'] AWS_SECRET_ACCESS_KEY_DELETE_PERF = os.environ['AWS_SECRET_ACCESS_KEY_DELETE_PERF'] BUCKET_PERF = os...
59.92
413
0.789052
import os AWS_ACCESS_KEY_ID_PERF = os.environ['AWS_ACCESS_KEY_ID_PERF'] AWS_SECRET_ACCESS_KEY_PERF = os.environ['AWS_SECRET_ACCESS_KEY_PERF'] AWS_ACCESS_KEY_ID_DELETE_PERF = os.environ['AWS_ACCESS_KEY_ID_DELETE_PERF'] AWS_SECRET_ACCESS_KEY_DELETE_PERF = os.environ['AWS_SECRET_ACCESS_KEY_DELETE_PERF'] BUCKET_PERF = os...
true
true
790ba770ac1f7a168aec95e7bc2b402d1e813373
23,311
py
Python
modules/balancer/balancer.py
wijnandb/CodeCult-Scratch
9bbbfd3b4b2f147bfac75cb1b704f08c63a11969
[ "Apache-2.0" ]
null
null
null
modules/balancer/balancer.py
wijnandb/CodeCult-Scratch
9bbbfd3b4b2f147bfac75cb1b704f08c63a11969
[ "Apache-2.0" ]
null
null
null
modules/balancer/balancer.py
wijnandb/CodeCult-Scratch
9bbbfd3b4b2f147bfac75cb1b704f08c63a11969
[ "Apache-2.0" ]
null
null
null
# Copyright 2015 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
33.253923
80
0.658616
__author__ = [ 'johncox@google.com (John Cox)', ] import logging import urllib from controllers import utils from models import config from models import custom_modules from models import entities from models import transforms from google.appengine.api import urlfetch from google.appengine.ext imp...
true
true
790ba77a0d6d6845a0e9840cf6ef07a9856814a9
8,833
py
Python
pynm/commands/metric.py
ohtaman/pynm
b003962201e4270d0dab681ede37f2d8edd560f2
[ "MIT" ]
1
2018-08-16T20:48:52.000Z
2018-08-16T20:48:52.000Z
pynm/commands/metric.py
ohtaman/pynm
b003962201e4270d0dab681ede37f2d8edd560f2
[ "MIT" ]
5
2015-01-12T20:40:46.000Z
2017-11-17T01:27:41.000Z
pynm/commands/metric.py
ohtaman/pynm
b003962201e4270d0dab681ede37f2d8edd560f2
[ "MIT" ]
null
null
null
# -*- coding:utf-8 -*- import csv import fileinput import sys import numpy from pynm.feature.metric.itml import learn_metric, convert_data class ItmlCommand: name = 'itml' help = 'Information Theoretic Metric Learning' @classmethod def build_arg_parser(cls, parser): parser.add_argument('-i...
37.270042
97
0.452621
import csv import fileinput import sys import numpy from pynm.feature.metric.itml import learn_metric, convert_data class ItmlCommand: name = 'itml' help = 'Information Theoretic Metric Learning' @classmethod def build_arg_parser(cls, parser): parser.add_argument('-i', ...
true
true
790ba7a8a47beb16bc3970fb72ea9b43d2f5717d
416
py
Python
sublime_exec.py
rgrannell1/sublime-exec
76311f47f8a3b7fd2969ab2a36f4140f21c4f320
[ "MIT" ]
null
null
null
sublime_exec.py
rgrannell1/sublime-exec
76311f47f8a3b7fd2969ab2a36f4140f21c4f320
[ "MIT" ]
null
null
null
sublime_exec.py
rgrannell1/sublime-exec
76311f47f8a3b7fd2969ab2a36f4140f21c4f320
[ "MIT" ]
null
null
null
#! /usr/bin/env python 3 import os import sublime import sublime_plugin import random import re import sys import math __version__ = '0.1.0' __authors__ = ['Ryan Grannell (@RyanGrannell)'] class BabelCommand (sublime_plugin.WindowCommand): """ babel loads a random file from your currently open folders. ...
11.885714
50
0.704327
import os import sublime import sublime_plugin import random import re import sys import math __version__ = '0.1.0' __authors__ = ['Ryan Grannell (@RyanGrannell)'] class BabelCommand (sublime_plugin.WindowCommand): def run (self): window = self.window open_folders = window.folders()
true
true
790ba99b6826b9dacdfc3f4386e29754279b0b8c
4,849
py
Python
lsw_slackbot/slack.py
emilyhunt/lsw-slackbot
1069aee5046b30075db52e1735c33d0ca84d71c4
[ "BSD-3-Clause" ]
null
null
null
lsw_slackbot/slack.py
emilyhunt/lsw-slackbot
1069aee5046b30075db52e1735c33d0ca84d71c4
[ "BSD-3-Clause" ]
null
null
null
lsw_slackbot/slack.py
emilyhunt/lsw-slackbot
1069aee5046b30075db52e1735c33d0ca84d71c4
[ "BSD-3-Clause" ]
null
null
null
"""Various functions that interact with Slack, e.g. posting messages.""" import asyncio import logging import socket from pathlib import Path from typing import Union, Optional from slack_sdk.errors import SlackApiError from lsw_slackbot.plots import plot_resource_use from lsw_slackbot.resources import current_memory...
41.444444
120
0.690864
import asyncio import logging import socket from pathlib import Path from typing import Union, Optional from slack_sdk.errors import SlackApiError from lsw_slackbot.plots import plot_resource_use from lsw_slackbot.resources import current_memory_fraction, _get_resource_usage_dataframe from lsw_slackbot.util import st...
true
true
790ba9f747aaf3a8cbdaffd0f2b7339afce84e14
8,599
py
Python
sdk/python/pulumi_aws/elasticloadbalancingv2/get_listener.py
chivandikwa/pulumi-aws
19c08bf9dcb90544450ffa4eec7bf6751058fde2
[ "ECL-2.0", "Apache-2.0" ]
260
2018-06-18T14:57:00.000Z
2022-03-29T11:41:03.000Z
sdk/python/pulumi_aws/elasticloadbalancingv2/get_listener.py
chivandikwa/pulumi-aws
19c08bf9dcb90544450ffa4eec7bf6751058fde2
[ "ECL-2.0", "Apache-2.0" ]
1,154
2018-06-19T20:38:20.000Z
2022-03-31T19:48:16.000Z
sdk/python/pulumi_aws/elasticloadbalancingv2/get_listener.py
chivandikwa/pulumi-aws
19c08bf9dcb90544450ffa4eec7bf6751058fde2
[ "ECL-2.0", "Apache-2.0" ]
115
2018-06-28T03:20:27.000Z
2022-03-29T11:41:06.000Z
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from .. import...
39.086364
198
0.671822
import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs __all__ = [ 'GetListenerResult', 'AwaitableGetListenerResult', 'get_listener', 'get_listener_output', ] warnings.warn("""aws.elas...
true
true
790baa2cdbf7e37f5b5914c5a65cfd0325fabf43
3,904
py
Python
percy/runner.py
robopsi/python-percy-client
c3a80ed567ad40b2f1eaaea76f0886aa6f0367eb
[ "MIT" ]
1
2017-10-31T11:29:24.000Z
2017-10-31T11:29:24.000Z
percy/runner.py
robopsi/python-percy-client
c3a80ed567ad40b2f1eaaea76f0886aa6f0367eb
[ "MIT" ]
1
2021-03-26T00:50:40.000Z
2021-03-26T00:50:40.000Z
percy/runner.py
rob-opsi/python-percy-client
c3a80ed567ad40b2f1eaaea76f0886aa6f0367eb
[ "MIT" ]
2
2018-06-05T02:33:05.000Z
2021-03-02T11:17:47.000Z
from __future__ import print_function import os import percy from percy import errors from percy import utils __all__ = ['Runner'] class Runner(object): def __init__(self, loader=None, config=None, client=None): self.loader = loader self.config = config or percy.Config() self.client = c...
41.094737
102
0.627561
from __future__ import print_function import os import percy from percy import errors from percy import utils __all__ = ['Runner'] class Runner(object): def __init__(self, loader=None, config=None, client=None): self.loader = loader self.config = config or percy.Config() self.client = c...
true
true
790baaf3d1cbb2d2e40b6686fd890453f1ef3bfa
4,145
py
Python
flat_api/models/flat_locales.py
FlatIO/api-client-python
898d1da77989b3e9075f0311b6a4d342a72e95ef
[ "Apache-2.0" ]
8
2017-04-09T15:54:12.000Z
2021-07-14T13:38:43.000Z
flat_api/models/flat_locales.py
FlatIO/api-client-python
898d1da77989b3e9075f0311b6a4d342a72e95ef
[ "Apache-2.0" ]
4
2018-07-20T13:22:40.000Z
2022-03-23T20:03:21.000Z
flat_api/models/flat_locales.py
FlatIO/api-client-python
898d1da77989b3e9075f0311b6a4d342a72e95ef
[ "Apache-2.0" ]
2
2018-05-29T08:29:59.000Z
2018-07-23T07:16:13.000Z
# coding: utf-8 """ Flat API The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and Mus...
40.242718
1,686
0.624367
import pprint import re import six class FlatLocales(object): EN = "en" ES = "es" FR = "fr" DE = "de" IT = "it" JA = "ja" KO = "ko" NL = "nl" PL = "pl" PT = "pt" RO = "ro" RU = "ru" ZH_HANS = "zh-Hans" openapi_types = { } attribute_map = { ...
true
true
790bad08556d18e05ef626300a04ba27b8c8f520
6,297
py
Python
sbibm/third_party/kgof/test/test_goftest.py
michaeldeistler/sbibm-1
8e9875f79beb828c07fbf4820b30413914d1ceca
[ "MIT" ]
2
2021-05-06T06:19:27.000Z
2022-02-20T19:49:55.000Z
sbibm/third_party/kgof/test/test_goftest.py
mackelab/sbibm
b9781c610a1a80d2de014ee46a29cf061fb6074a
[ "MIT" ]
null
null
null
sbibm/third_party/kgof/test/test_goftest.py
mackelab/sbibm
b9781c610a1a80d2de014ee46a29cf061fb6074a
[ "MIT" ]
1
2022-01-23T15:54:06.000Z
2022-01-23T15:54:06.000Z
""" Module for testing goftest module. """ __author__ = "wittawat" import unittest import matplotlib.pyplot as plt import numpy as np import numpy.testing as testing import scipy.stats as stats import sbibm.third_party.kgof.data as data import sbibm.third_party.kgof.density as density import sbibm.third_party.kgof....
32.458763
88
0.545974
__author__ = "wittawat" import unittest import matplotlib.pyplot as plt import numpy as np import numpy.testing as testing import scipy.stats as stats import sbibm.third_party.kgof.data as data import sbibm.third_party.kgof.density as density import sbibm.third_party.kgof.glo as glo import sbibm.third_party.kgof.go...
true
true
790bae7773b5f6ce59d80bb4d211c93504258926
4,504
py
Python
brave/evaluate_video_embeddings.py
deepmind/brave
0ae20d9afcf6b1fa4d31d70c906d711901b56e9c
[ "Apache-2.0" ]
26
2021-10-14T19:06:56.000Z
2022-03-02T18:22:45.000Z
brave/evaluate_video_embeddings.py
deepmind/brave
0ae20d9afcf6b1fa4d31d70c906d711901b56e9c
[ "Apache-2.0" ]
1
2022-01-31T23:23:31.000Z
2022-02-08T01:07:15.000Z
brave/evaluate_video_embeddings.py
deepmind/brave
0ae20d9afcf6b1fa4d31d70c906d711901b56e9c
[ "Apache-2.0" ]
1
2022-02-04T10:54:53.000Z
2022-02-04T10:54:53.000Z
# Copyright 2021 DeepMind Technologies Limited # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agree...
34.381679
80
0.75222
import glob import json from absl import app from absl import flags import chex import jax import numpy as np import tensorflow as tf from brave.datasets import datasets from brave.evaluate import evaluate_video_embedding from brave.models.brave import brave FLAGS = flags.FLAGS flags.DEFINE_string('c...
true
true
790baee50d3a4eb3520cf77a358a4df1a1cb9b46
1,573
py
Python
ppmessage/api/handlers/ppmovepredefinedscriptintogroup.py
x-debug/ppmessage_fork
a2cb51333b2bfed92fb81ae130c825d0eada7c69
[ "MIT" ]
3
2018-07-22T10:56:42.000Z
2020-01-14T10:33:26.000Z
ppmessage/api/handlers/ppmovepredefinedscriptintogroup.py
x-debug/ppmessage_fork
a2cb51333b2bfed92fb81ae130c825d0eada7c69
[ "MIT" ]
null
null
null
ppmessage/api/handlers/ppmovepredefinedscriptintogroup.py
x-debug/ppmessage_fork
a2cb51333b2bfed92fb81ae130c825d0eada7c69
[ "MIT" ]
7
2018-03-22T05:27:47.000Z
2021-01-19T13:03:17.000Z
# -*- coding: utf-8 -*- # # Copyright (C) 2010-2016 PPMessage. # Guijin Ding, dingguijin@gmail.com # # from .basehandler import BaseHandler from ppmessage.api.error import API_ERR from ppmessage.core.constant import API_LEVEL from ppmessage.db.models import PredefinedScript import json import logging class PPMovePr...
30.843137
92
0.684043
from .basehandler import BaseHandler from ppmessage.api.error import API_ERR from ppmessage.core.constant import API_LEVEL from ppmessage.db.models import PredefinedScript import json import logging class PPMovePredefinedScriptIntoGroup(BaseHandler): def _move(self): _request = json.loads(self.re...
true
true
790bb1342a730b61c3eb1c2540883c5b76180c39
1,699
py
Python
main.py
v-sht/url-shortener
5110e4cf23478e44ebbeb0a7514e98f31031c6f5
[ "MIT" ]
null
null
null
main.py
v-sht/url-shortener
5110e4cf23478e44ebbeb0a7514e98f31031c6f5
[ "MIT" ]
null
null
null
main.py
v-sht/url-shortener
5110e4cf23478e44ebbeb0a7514e98f31031c6f5
[ "MIT" ]
null
null
null
from urllib.parse import urlparse from dotenv import load_dotenv import requests import os import argparse def shorten_link(token, url): response = requests.post( "https://api-ssl.bitly.com/v4/bitlinks", headers={"Authorization": "Bearer {}".format(token)}, json={"long_url": url}) resp...
31.462963
73
0.646851
from urllib.parse import urlparse from dotenv import load_dotenv import requests import os import argparse def shorten_link(token, url): response = requests.post( "https://api-ssl.bitly.com/v4/bitlinks", headers={"Authorization": "Bearer {}".format(token)}, json={"long_url": url}) resp...
true
true
790bb26116ce9c96df8d92137cd7685d7085844f
205
py
Python
courses/src/base_app/utils.py
yuramorozov01/courses_system
582532b2a2753d89642e1e8dbee0f369774638b1
[ "Apache-2.0" ]
null
null
null
courses/src/base_app/utils.py
yuramorozov01/courses_system
582532b2a2753d89642e1e8dbee0f369774638b1
[ "Apache-2.0" ]
null
null
null
courses/src/base_app/utils.py
yuramorozov01/courses_system
582532b2a2753d89642e1e8dbee0f369774638b1
[ "Apache-2.0" ]
null
null
null
import uuid def get_unique_filename(instance, filename): ext = filename.split('.')[-1] filename = '{}.{}'.format(uuid.uuid4(), ext) return 'user_{0}/{1}'.format(instance.author.id, filename)
25.625
62
0.653659
import uuid def get_unique_filename(instance, filename): ext = filename.split('.')[-1] filename = '{}.{}'.format(uuid.uuid4(), ext) return 'user_{0}/{1}'.format(instance.author.id, filename)
true
true
790bb2b2346db328645da4a58ef2ec3b51ffc921
311,499
py
Python
sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_08_01/aio/operations/_operations.py
vincenttran-msft/azure-sdk-for-python
348b56f9f03eeb3f7b502eed51daf494ffff874d
[ "MIT" ]
1
2022-02-01T18:50:12.000Z
2022-02-01T18:50:12.000Z
sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_08_01/aio/operations/_operations.py
vincenttran-msft/azure-sdk-for-python
348b56f9f03eeb3f7b502eed51daf494ffff874d
[ "MIT" ]
null
null
null
sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_08_01/aio/operations/_operations.py
vincenttran-msft/azure-sdk-for-python
348b56f9f03eeb3f7b502eed51daf494ffff874d
[ "MIT" ]
null
null
null
# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRe...
44.411035
4,257
0.6624
from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar, Union from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.pipeline import Pip...
true
true
790bb2ff511a693f4e1285c5398343c2b12ed192
2,608
py
Python
geometry_tools.py
helkebir/Reachable-Set-Inner-Approximation
4e05780b692214c26c76692f65f61d2f7f506e79
[ "MIT" ]
null
null
null
geometry_tools.py
helkebir/Reachable-Set-Inner-Approximation
4e05780b692214c26c76692f65f61d2f7f506e79
[ "MIT" ]
null
null
null
geometry_tools.py
helkebir/Reachable-Set-Inner-Approximation
4e05780b692214c26c76692f65f61d2f7f506e79
[ "MIT" ]
null
null
null
import numpy as np from shapely import geometry def shrink(coords: np.ndarray, dist: np.ndarray) -> tuple[np.ndarray]: """Shrinks a 2D polygon by a given distance. The coordinates of the polygon are expected as an N x 2-matrix, and a positive distance results in inward shrinking. An empty set is ...
28.977778
77
0.63842
import numpy as np from shapely import geometry def shrink(coords: np.ndarray, dist: np.ndarray) -> tuple[np.ndarray]: my_polygon = geometry.Polygon(coords) xy = my_polygon.exterior.xy my_polygon_shrunken = my_polygon.buffer(-dist) try: xys = my_polygon_shrunken.exterior.xy except...
true
true
790bb3805d70650b4582bb054398b5842ab0fffc
17,938
py
Python
tests/nlu/base/test_training_data.py
vishnuvrpriya/rasa
60f6a86dfbdafcd62360a7e4a90be01cd437c4ea
[ "Apache-2.0" ]
1
2019-11-03T02:21:17.000Z
2019-11-03T02:21:17.000Z
tests/nlu/base/test_training_data.py
vishnuvrpriya/rasa
60f6a86dfbdafcd62360a7e4a90be01cd437c4ea
[ "Apache-2.0" ]
6
2020-01-28T23:04:20.000Z
2022-02-10T00:43:04.000Z
tests/nlu/base/test_training_data.py
vishnuvrpriya/rasa
60f6a86dfbdafcd62360a7e4a90be01cd437c4ea
[ "Apache-2.0" ]
1
2021-06-08T17:24:15.000Z
2021-06-08T17:24:15.000Z
# -*- coding: utf-8 -*- import pytest import tempfile from jsonschema import ValidationError from rasa.nlu import training_data from rasa.nlu.convert import convert_training_data from rasa.nlu.extractors.mitie_entity_extractor import MitieEntityExtractor from rasa.nlu.tokenizers.whitespace_tokenizer import Whitespace...
30.249578
88
0.606088
import pytest import tempfile from jsonschema import ValidationError from rasa.nlu import training_data from rasa.nlu.convert import convert_training_data from rasa.nlu.extractors.mitie_entity_extractor import MitieEntityExtractor from rasa.nlu.tokenizers.whitespace_tokenizer import WhitespaceTokenizer from rasa.nlu...
true
true
790bb397ed174d5bc527ff81c8425cde79b6a1f3
1,163
py
Python
my_blog/users/tests/test_forms.py
Tanishk-Sharma/my_blog
c6b24897b4d3745426749f5e6599e41f3f479d38
[ "MIT" ]
null
null
null
my_blog/users/tests/test_forms.py
Tanishk-Sharma/my_blog
c6b24897b4d3745426749f5e6599e41f3f479d38
[ "MIT" ]
null
null
null
my_blog/users/tests/test_forms.py
Tanishk-Sharma/my_blog
c6b24897b4d3745426749f5e6599e41f3f479d38
[ "MIT" ]
null
null
null
""" Module for all Form Tests. """ import pytest from django.utils.translation import gettext_lazy as _ from my_blog.users.forms import UserCreationForm from my_blog.users.models import User pytestmark = pytest.mark.django_db class TestUserCreationForm: """ Test class for all tests related to the UserCreati...
29.075
87
0.628547
import pytest from django.utils.translation import gettext_lazy as _ from my_blog.users.forms import UserCreationForm from my_blog.users.models import User pytestmark = pytest.mark.django_db class TestUserCreationForm: def test_username_validation_error_msg(self, user: User): form = ...
true
true
790bb3da0331fc7632f49bd52fac6e12ea0f1c75
8,087
py
Python
loss.py
miroozyx/Magin-Based-loss
fedb43af495d60079fe87ecee8b4ad1c59e17cdc
[ "Apache-2.0" ]
4
2020-09-03T16:16:09.000Z
2021-06-20T22:08:17.000Z
loss.py
miroozyx/Margin-Based-Loss
fedb43af495d60079fe87ecee8b4ad1c59e17cdc
[ "Apache-2.0" ]
null
null
null
loss.py
miroozyx/Margin-Based-Loss
fedb43af495d60079fe87ecee8b4ad1c59e17cdc
[ "Apache-2.0" ]
null
null
null
import tensorflow as tf from tensorflow.contrib.losses.python.metric_learning.metric_loss_ops import pairwise_distance def dist_weighted_sampling(labels, embeddings, high_var_threshold=0.5, nonzero_loss_threshold=1.4, neg_multiplier=1): """ Distance weighted sampling. # References - [sampling matt...
45.948864
128
0.632497
import tensorflow as tf from tensorflow.contrib.losses.python.metric_learning.metric_loss_ops import pairwise_distance def dist_weighted_sampling(labels, embeddings, high_var_threshold=0.5, nonzero_loss_threshold=1.4, neg_multiplier=1): if not isinstance(neg_multiplier, int): raise ValueError("`neg_multip...
true
true
790bb4670d9c988c89613051847c4e05a6a4ff6e
1,448
py
Python
category_encoders/__init__.py
RoyalTS/category_encoders
a810a4b7abfce9fc4eb7fc401e3d37f2c1c6e402
[ "BSD-3-Clause" ]
1
2021-07-09T08:14:31.000Z
2021-07-09T08:14:31.000Z
category_encoders/__init__.py
RoyalTS/category_encoders
a810a4b7abfce9fc4eb7fc401e3d37f2c1c6e402
[ "BSD-3-Clause" ]
null
null
null
category_encoders/__init__.py
RoyalTS/category_encoders
a810a4b7abfce9fc4eb7fc401e3d37f2c1c6e402
[ "BSD-3-Clause" ]
null
null
null
""" .. module:: category_encoders :synopsis: :platform: """ from category_encoders.backward_difference import BackwardDifferenceEncoder from category_encoders.binary import BinaryEncoder from category_encoders.count import CountEncoder from category_encoders.hashing import HashingEncoder from category_encoders.h...
28.96
75
0.812155
from category_encoders.backward_difference import BackwardDifferenceEncoder from category_encoders.binary import BinaryEncoder from category_encoders.count import CountEncoder from category_encoders.hashing import HashingEncoder from category_encoders.helmert import HelmertEncoder from category_encoders.one_hot import...
true
true
790bb4e3fe5e16fb5a9d5d7f20428ad6ca73a505
167
py
Python
app/app/urls.py
AveraqeDev/django-react
2b081f7018be4e193f47d6267c96a1b7cfc816cc
[ "MIT" ]
null
null
null
app/app/urls.py
AveraqeDev/django-react
2b081f7018be4e193f47d6267c96a1b7cfc816cc
[ "MIT" ]
6
2021-03-18T22:00:46.000Z
2021-09-22T18:06:26.000Z
app/app/urls.py
AveraqeDev/django-react
2b081f7018be4e193f47d6267c96a1b7cfc816cc
[ "MIT" ]
null
null
null
from django.contrib import admin from django.urls import path, include urlpatterns = [ path('', include('frontend.urls')), path('admin/', admin.site.urls), ]
20.875
39
0.688623
from django.contrib import admin from django.urls import path, include urlpatterns = [ path('', include('frontend.urls')), path('admin/', admin.site.urls), ]
true
true
790bb81cbf85ab84246154564af2a426da40ed3c
1,447
py
Python
gui/addmealpopup.py
Penaz91/fjournal
0cf1634f67308f3491241d1bb250772ce4def2a0
[ "MIT" ]
null
null
null
gui/addmealpopup.py
Penaz91/fjournal
0cf1634f67308f3491241d1bb250772ce4def2a0
[ "MIT" ]
null
null
null
gui/addmealpopup.py
Penaz91/fjournal
0cf1634f67308f3491241d1bb250772ce4def2a0
[ "MIT" ]
null
null
null
""" This file is part of the FJournal Project. Copyright © 2019-2020, Daniele Penazzo. All Rights Reserved. The use of this code is governed by the MIT license attached. See the LICENSE file for the full license. Created on: 2020-07-10 Author: Penaz """ from tkinter import ttk import tkinter as tk from models import ...
27.301887
68
0.595715
from tkinter import ttk import tkinter as tk from models import Meal class AddMealPopup(ttk.Frame): def __init__(self, master=None, session=None): super().__init__(master) self.master = master self.grid(row=0, column=0) self.session = session self.mealname = tk.StringVar()...
true
true
790bb8453995886052183835f511324b191aca37
1,827
py
Python
python-package/setup.py
ccgcyber/xlearn
ce92933de81b4372fbe54a597583c40ebb946c40
[ "Apache-2.0" ]
null
null
null
python-package/setup.py
ccgcyber/xlearn
ce92933de81b4372fbe54a597583c40ebb946c40
[ "Apache-2.0" ]
null
null
null
python-package/setup.py
ccgcyber/xlearn
ce92933de81b4372fbe54a597583c40ebb946c40
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2018 by contributors. 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...
37.285714
92
0.708265
from __future__ import absolute_import import sys import os from setuptools import setup, find_packages sys.path.insert(0, '.') CURRENT_DIR = os.path.dirname(__file__) libpath_py = os.path.join(CURRENT_DIR, 'xlearn/libpath.py') libpath = {'__file__': libpath_py} exec(compile(open(libpath_py, "rb").read...
true
true
790bb8862fefd39331fd276c49da96cfbe269f62
2,032
py
Python
src/tso/tsocli/tests/test_cli.py
elijah-ward/TSO
610565a32284cab23e9262c3431ce6d34116bfcf
[ "MIT" ]
4
2018-11-05T21:36:08.000Z
2019-04-15T13:05:39.000Z
src/tso/tsocli/tests/test_cli.py
elijah-ward/TSO
610565a32284cab23e9262c3431ce6d34116bfcf
[ "MIT" ]
2
2019-02-23T07:13:40.000Z
2019-04-07T17:50:44.000Z
src/tso/tsocli/tests/test_cli.py
elijah-ward/TSO
610565a32284cab23e9262c3431ce6d34116bfcf
[ "MIT" ]
2
2020-12-09T07:03:09.000Z
2021-07-17T02:32:46.000Z
""" CLI tests """ from tso.tsocli import __main__ as tsocli import pytest from unittest.mock import patch, MagicMock, mock_open mock_configurqation = "{}" class TestCli: def test_cli_should_exit_with_no_args(self): with pytest.raises(SystemExit) as pytest_wrapped_e: tsocli.main([]) ...
30.787879
95
0.683071
from tso.tsocli import __main__ as tsocli import pytest from unittest.mock import patch, MagicMock, mock_open mock_configurqation = "{}" class TestCli: def test_cli_should_exit_with_no_args(self): with pytest.raises(SystemExit) as pytest_wrapped_e: tsocli.main([]) assert pytest_w...
true
true
790bb8fbde9d9b9885de31de29198c0e07b9c0c6
3,552
py
Python
dask/bag/random.py
sdementen/dask
781b3eb5626f3cc74c7b4c69187f5cd941513a39
[ "BSD-3-Clause" ]
1
2019-01-31T02:44:21.000Z
2019-01-31T02:44:21.000Z
dask/bag/random.py
sdementen/dask
781b3eb5626f3cc74c7b4c69187f5cd941513a39
[ "BSD-3-Clause" ]
37
2020-10-20T08:30:53.000Z
2020-12-22T13:15:45.000Z
dask/bag/random.py
sdementen/dask
781b3eb5626f3cc74c7b4c69187f5cd941513a39
[ "BSD-3-Clause" ]
1
2019-01-31T02:44:12.000Z
2019-01-31T02:44:12.000Z
import heapq import math import random as rnd from functools import partial from .core import Bag def sample(population, k): """Chooses k unique random elements from a bag. Returns a new bag containing elements from the population while leaving the original population unchanged. Parameters ---...
26.117647
89
0.623592
import heapq import math import random as rnd from functools import partial from .core import Bag def sample(population, k): return _sample(population=population, k=k, replace=False) def choices(population, k=1): return _sample(population=population, k=k, replace=True) def _sample(population, k, replace...
true
true
790bb919c8c0cb69f353e3f17445f29461bc75d4
17,771
py
Python
twitter_countryGeo/twitter-geo/etool/queue.py
nwself/geocoding
0919dc2dc209a01a05930bfe21783fc324a584a0
[ "MIT" ]
3
2018-03-13T00:51:24.000Z
2020-04-01T16:40:01.000Z
twitter_countryGeo/twitter-geo/etool/queue.py
nwself/geocoding
0919dc2dc209a01a05930bfe21783fc324a584a0
[ "MIT" ]
2
2020-05-14T01:28:02.000Z
2020-09-24T21:56:38.000Z
twitter_countryGeo/twitter-geo/etool/queue.py
nwself/geocoding
0919dc2dc209a01a05930bfe21783fc324a584a0
[ "MIT" ]
4
2018-03-13T00:03:48.000Z
2020-05-13T18:00:16.000Z
#!/usr/bin/env python import sys import json import re import logging import os import os.path import codecs import time import conf import logs import kqueue log = logging.getLogger(__name__) # constant to select bind() for attaching the socket BIND = 1 # constant to select connect() for attaching the socket CONNE...
30.018581
117
0.565978
import sys import json import re import logging import os import os.path import codecs import time import conf import logs import kqueue log = logging.getLogger(__name__) BIND = 1 CONNECT = 2 SERVICE = "" INITTED = False KCONNECTION = None def init(args=None): global SERVICE, INITT...
false
true
790bb98d4b406927f9ab352919465ce9328484e3
13,536
py
Python
benchmarks/ltl_timed_transition_system/token_ring/f3/token_ring_0024.py
EnricoMagnago/F3
c863215c318d7d5f258eb9be38c6962cf6863b52
[ "MIT" ]
3
2021-04-23T23:29:26.000Z
2022-03-23T10:00:30.000Z
benchmarks/ltl_timed_transition_system/token_ring/f3/token_ring_0024.py
EnricoMagnago/F3
c863215c318d7d5f258eb9be38c6962cf6863b52
[ "MIT" ]
null
null
null
benchmarks/ltl_timed_transition_system/token_ring/f3/token_ring_0024.py
EnricoMagnago/F3
c863215c318d7d5f258eb9be38c6962cf6863b52
[ "MIT" ]
1
2021-11-17T22:02:56.000Z
2021-11-17T22:02:56.000Z
from collections import Iterable from itertools import combinations from math import log, ceil from mathsat import msat_term, msat_env from mathsat import msat_make_constant, msat_declare_function from mathsat import msat_get_rational_type, msat_get_bool_type from mathsat import msat_make_and, msat_make_not, msat_make...
39.578947
88
0.591534
from collections import Iterable from itertools import combinations from math import log, ceil from mathsat import msat_term, msat_env from mathsat import msat_make_constant, msat_declare_function from mathsat import msat_get_rational_type, msat_get_bool_type from mathsat import msat_make_and, msat_make_not, msat_make...
true
true
790bba6a4a4c6bee5551899edc7836f9eefab95a
1,526
py
Python
packages/jet_bridge_base/jet_bridge_base/views/register.py
bokal2/jet-bridge
dddc4f55c2d5a28c02ce9515dffc750e3887450f
[ "MIT" ]
2
2020-04-18T14:34:44.000Z
2020-04-18T14:34:47.000Z
packages/jet_bridge_base/jet_bridge_base/views/register.py
bokal2/jet-bridge
dddc4f55c2d5a28c02ce9515dffc750e3887450f
[ "MIT" ]
null
null
null
packages/jet_bridge_base/jet_bridge_base/views/register.py
bokal2/jet-bridge
dddc4f55c2d5a28c02ce9515dffc750e3887450f
[ "MIT" ]
null
null
null
from six.moves.urllib_parse import quote from jet_bridge_base import settings from jet_bridge_base.responses.base import Response from jet_bridge_base.responses.redirect import RedirectResponse from jet_bridge_base.status import HTTP_400_BAD_REQUEST from jet_bridge_base.views.base.api import APIView class RegisterVi...
35.488372
105
0.659895
from six.moves.urllib_parse import quote from jet_bridge_base import settings from jet_bridge_base.responses.base import Response from jet_bridge_base.responses.redirect import RedirectResponse from jet_bridge_base.status import HTTP_400_BAD_REQUEST from jet_bridge_base.views.base.api import APIView class RegisterVi...
true
true
790bbaf8e6b6e3e030475b1cf8154b1be53ed58b
21
py
Python
examples/permissionsexample/models.py
max-arnold/django-rest-framework
ce5eb85082dd775bb5079ae7af91840fba7f9a6e
[ "BSD-2-Clause" ]
2
2017-12-05T15:32:58.000Z
2017-12-05T15:33:02.000Z
examples/permissionsexample/models.py
upgrade-drf/django-rest-framework-0.4
ce5eb85082dd775bb5079ae7af91840fba7f9a6e
[ "BSD-2-Clause" ]
null
null
null
examples/permissionsexample/models.py
upgrade-drf/django-rest-framework-0.4
ce5eb85082dd775bb5079ae7af91840fba7f9a6e
[ "BSD-2-Clause" ]
1
2020-12-18T11:24:55.000Z
2020-12-18T11:24:55.000Z
#for fixture loading
10.5
20
0.809524
true
true
790bbcaa506bdbe2a86a708c00fe73aefd26746c
2,286
py
Python
contrib/thrifty/tests/python/pants_test/pants/contrib/thrifty/test_thrifty_gen.py
anthonyjpratti/pants
d98e53af6ddd877861231bce8343f8204da0a9d1
[ "Apache-2.0" ]
null
null
null
contrib/thrifty/tests/python/pants_test/pants/contrib/thrifty/test_thrifty_gen.py
anthonyjpratti/pants
d98e53af6ddd877861231bce8343f8204da0a9d1
[ "Apache-2.0" ]
null
null
null
contrib/thrifty/tests/python/pants_test/pants/contrib/thrifty/test_thrifty_gen.py
anthonyjpratti/pants
d98e53af6ddd877861231bce8343f8204da0a9d1
[ "Apache-2.0" ]
null
null
null
# Copyright 2018 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from pants.backend.codegen.wire.java.register import build_file_aliases as register_codegen from pants.backend.jvm.targets.jar_library import JarLibrary from pants.build_graph.register imp...
41.563636
91
0.728346
from pants.backend.codegen.wire.java.register import build_file_aliases as register_codegen from pants.backend.jvm.targets.jar_library import JarLibrary from pants.build_graph.register import build_file_aliases as register_core from pants.java.jar.jar_dependency import JarDependency from pants.testutil.task_test_bas...
true
true
790bbcd10e63835d6ffdac40f3ed37d1ddd0aa78
1,622
py
Python
app/core/tests/test_models.py
Rish1711/recipe-app-api
eb0c6b6009d8696ae1f7652f2546c1d0d8dde4d0
[ "MIT" ]
null
null
null
app/core/tests/test_models.py
Rish1711/recipe-app-api
eb0c6b6009d8696ae1f7652f2546c1d0d8dde4d0
[ "MIT" ]
null
null
null
app/core/tests/test_models.py
Rish1711/recipe-app-api
eb0c6b6009d8696ae1f7652f2546c1d0d8dde4d0
[ "MIT" ]
null
null
null
from django.test import TestCase from django.contrib.auth import get_user_model from core import models def sample_user(email='rg171195@gmail.com', password='testpass'): '''Creating sample user''' return get_user_model().objects.create_user(email, password) class ModelTests(TestCase): def test_create_u...
33.102041
73
0.658446
from django.test import TestCase from django.contrib.auth import get_user_model from core import models def sample_user(email='rg171195@gmail.com', password='testpass'): return get_user_model().objects.create_user(email, password) class ModelTests(TestCase): def test_create_user_with_email_successful(self)...
true
true
790bbcf99152c50fb5c331ca5fc517729a6d1dc6
3,832
py
Python
tests/test_aiprolog.py
0zAND1z/zamia-ai
d9e9c6123fdadca3fae55e87ea2b2b32d82bc210
[ "Apache-2.0" ]
129
2017-03-23T14:20:33.000Z
2022-01-03T01:52:22.000Z
tests/test_aiprolog.py
0zAND1z/zamia-ai
d9e9c6123fdadca3fae55e87ea2b2b32d82bc210
[ "Apache-2.0" ]
6
2017-03-09T22:32:55.000Z
2021-05-13T19:07:48.000Z
tests/test_aiprolog.py
gooofy/voxforge
da21be38e976aae67214537a27a30541afd3b5aa
[ "Apache-2.0" ]
22
2017-04-07T15:44:05.000Z
2022-03-13T02:41:08.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2017 Guenter Bartsch, Heiko Schaefer # # 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/LICEN...
32.752137
190
0.640919
import unittest import logging import codecs from nltools import misc from sqlalchemy.orm import sessionmaker from zamiaai import model from zamiaprolog.logicdb import LogicDB from aiprolog.runtime import AIPrologRuntime from aiprolog.p...
true
true
790bbe8b5ec1f0ff832e78f115d25819d3f1882b
2,646
py
Python
IMLearn/learners/regressors/polynomial_fitting.py
shirlevy007/IML.HUJI
07e9db86f83925719242d20de52e65d2fe3786ce
[ "MIT" ]
null
null
null
IMLearn/learners/regressors/polynomial_fitting.py
shirlevy007/IML.HUJI
07e9db86f83925719242d20de52e65d2fe3786ce
[ "MIT" ]
null
null
null
IMLearn/learners/regressors/polynomial_fitting.py
shirlevy007/IML.HUJI
07e9db86f83925719242d20de52e65d2fe3786ce
[ "MIT" ]
null
null
null
from __future__ import annotations from typing import NoReturn from . import LinearRegression from ...base import BaseEstimator import numpy as np # import linear_regression class PolynomialFitting(BaseEstimator): """ Polynomial Fitting using Least Squares estimation """ def __init__(self, k: int) -> ...
28.451613
83
0.586546
from __future__ import annotations from typing import NoReturn from . import LinearRegression from ...base import BaseEstimator import numpy as np class PolynomialFitting(BaseEstimator): def __init__(self, k: int) -> PolynomialFitting: super().__init__() self.deg_ = k self.vander_, self.v...
true
true
790bbe8e7236044b2723c1ebc12825c204b727f0
49,477
py
Python
mindspore/nn/layer/conv.py
Rossil2012/mindspore
8a20b5d784b3fec6d32e058581ec56ec553a06a0
[ "Apache-2.0" ]
1
2021-04-23T06:35:18.000Z
2021-04-23T06:35:18.000Z
mindspore/nn/layer/conv.py
Rossil2012/mindspore
8a20b5d784b3fec6d32e058581ec56ec553a06a0
[ "Apache-2.0" ]
null
null
null
mindspore/nn/layer/conv.py
Rossil2012/mindspore
8a20b5d784b3fec6d32e058581ec56ec553a06a0
[ "Apache-2.0" ]
null
null
null
# Copyright 2020 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 agreed to...
51.592284
119
0.581462
import numpy as np from mindspore import log as logger from mindspore.ops import operations as P from mindspore.ops.primitive import constexpr from mindspore.common.parameter import Parameter from mindspore.common.initializer import initializer from mindspore.common.tensor import Tensor from mindspore._c...
true
true
790bbed35afb5241238f5607dd49024352cacced
4,624
py
Python
chroma_core/services/job_scheduler/lock_cache.py
beevans/integrated-manager-for-lustre
6b7e49b8a58058e6139ad815a4388f21a581dfa0
[ "MIT" ]
52
2018-09-13T03:26:23.000Z
2022-03-25T16:51:37.000Z
chroma_core/services/job_scheduler/lock_cache.py
beevans/integrated-manager-for-lustre
6b7e49b8a58058e6139ad815a4388f21a581dfa0
[ "MIT" ]
1,264
2018-06-15T19:50:57.000Z
2022-03-28T08:19:04.000Z
chroma_core/services/job_scheduler/lock_cache.py
beevans/integrated-manager-for-lustre
6b7e49b8a58058e6139ad815a4388f21a581dfa0
[ "MIT" ]
27
2018-06-18T08:51:59.000Z
2022-03-16T15:35:34.000Z
# Copyright (c) 2020 DDN. All rights reserved. # Use of this source code is governed by a MIT-style # license that can be found in the LICENSE file. from collections import defaultdict import json from django.db.models import Q from django.contrib.contenttypes.models import ContentType class LockCache(object): ...
33.028571
103
0.632353
from collections import defaultdict import json from django.db.models import Q from django.contrib.contenttypes.models import ContentType class LockCache(object): lock_change_receivers = [] LOCK_ADD = 1 LOCK_REMOVE = 2 def __init__(self): from chroma_core.models import Jo...
true
true
790bbee323f40bb34a051962085378910292dc4b
16,503
py
Python
dist/awscli/customizations/datapipeline/__init__.py
claytonbrown/SublimeLinter-contrib-AWS-Cloudformation-JSON
bb778ee4ff56e95fc8ee76b8a20deac8a9894bf2
[ "MIT" ]
null
null
null
dist/awscli/customizations/datapipeline/__init__.py
claytonbrown/SublimeLinter-contrib-AWS-Cloudformation-JSON
bb778ee4ff56e95fc8ee76b8a20deac8a9894bf2
[ "MIT" ]
null
null
null
dist/awscli/customizations/datapipeline/__init__.py
claytonbrown/SublimeLinter-contrib-AWS-Cloudformation-JSON
bb778ee4ff56e95fc8ee76b8a20deac8a9894bf2
[ "MIT" ]
null
null
null
# Copyright 2015 Amazon.com, Inc. or its affiliates. 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. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file acc...
39.106635
79
0.64558
import json from datetime import datetime, timedelta from awscli.formatter import get_formatter from awscli.arguments import CustomArgument from awscli.customizations.commands import BasicCommand from awscli.customizations.datapipeline import translator from awscli.customizations.datapipeline.createdefaul...
true
true
790bbf4ae0b9bb04e22928415e35dcd30354d70d
501
py
Python
services/gen_der_dict.py
ishine/self_supervised_AHC
59c3a05dfe2f0fc24f54a316d87bc28b07bcdd9a
[ "Apache-2.0" ]
10
2020-08-11T02:58:31.000Z
2022-03-18T06:39:38.000Z
services/gen_der_dict.py
ishine/self_supervised_AHC
59c3a05dfe2f0fc24f54a316d87bc28b07bcdd9a
[ "Apache-2.0" ]
2
2021-12-07T10:33:58.000Z
2021-12-16T05:15:32.000Z
services/gen_der_dict.py
ishine/self_supervised_AHC
59c3a05dfe2f0fc24f54a316d87bc28b07bcdd9a
[ "Apache-2.0" ]
4
2020-08-04T00:33:18.000Z
2021-12-08T03:33:07.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Tue Jan 21 19:14:52 2020 @author: prachi """ import pickle import numpy as np der='swbd_diar/exp_new/callhome/plda_oracle/der.scp' der_pickle = 'swbd_diar/exp_new/callhome/plda_oracle/derdict' der=open(der,'r').readlines() DER={} for line i...
20.875
62
0.658683
import pickle import numpy as np der='swbd_diar/exp_new/callhome/plda_oracle/der.scp' der_pickle = 'swbd_diar/exp_new/callhome/plda_oracle/derdict' der=open(der,'r').readlines() DER={} for line in der[2:-1]: fname = line.split()[0] val = float(line.split()[1]) DER[fname] = val pickleobj=op...
true
true
790bc0b9a51c9b8febf6e51afe0293d9f49d74ec
2,997
py
Python
local_configs/10.18/cg10+w=2+es130k.py
wzpscott/SegformerDistillation
6558757f5071251410e90270e197755860a6f41c
[ "DOC" ]
null
null
null
local_configs/10.18/cg10+w=2+es130k.py
wzpscott/SegformerDistillation
6558757f5071251410e90270e197755860a6f41c
[ "DOC" ]
null
null
null
local_configs/10.18/cg10+w=2+es130k.py
wzpscott/SegformerDistillation
6558757f5071251410e90270e197755860a6f41c
[ "DOC" ]
null
null
null
_base_ = [ '../_base_/datasets/ade20k_repeat.py', '../_base_/default_runtime.py', '../_base_/schedules/schedule_160k_adamw.py' ] norm_cfg = dict(type='SyncBN', requires_grad=True) model = dict( type='SDModule', cfg_s=dict( type='EncoderDecoder', pretrained='pretrained/mit_b0.pth', ...
34.848837
95
0.538872
_base_ = [ '../_base_/datasets/ade20k_repeat.py', '../_base_/default_runtime.py', '../_base_/schedules/schedule_160k_adamw.py' ] norm_cfg = dict(type='SyncBN', requires_grad=True) model = dict( type='SDModule', cfg_s=dict( type='EncoderDecoder', pretrained='pretrained/mit_b0.pth', ...
true
true
790bc136cffade49b8cb81b0413b948af3fe17e2
166
py
Python
emailautomate/views.py
pradyneel/xtreme-weather
0e19a1ead2d88ec474d210709e6398c5d2b6cc5b
[ "MIT" ]
null
null
null
emailautomate/views.py
pradyneel/xtreme-weather
0e19a1ead2d88ec474d210709e6398c5d2b6cc5b
[ "MIT" ]
null
null
null
emailautomate/views.py
pradyneel/xtreme-weather
0e19a1ead2d88ec474d210709e6398c5d2b6cc5b
[ "MIT" ]
null
null
null
from django.http import HttpResponse from django.shortcuts import render # Create your views here. def index(request): return HttpResponse("Check URL => /admin")
27.666667
46
0.771084
from django.http import HttpResponse from django.shortcuts import render def index(request): return HttpResponse("Check URL => /admin")
true
true
790bc1b095a73cd6ad6e3aa12ae444551dff78f4
4,338
py
Python
util_common/nlp/Sumy/summarizers/lsa.py
cscyuge/pointer-generator
74b3b974e72209dc7a4045cabb758465998c920a
[ "MIT" ]
56
2019-03-16T09:49:57.000Z
2021-09-20T08:24:29.000Z
util_common/nlp/Sumy/summarizers/lsa.py
cscyuge/pointer-generator
74b3b974e72209dc7a4045cabb758465998c920a
[ "MIT" ]
10
2019-03-30T01:57:22.000Z
2020-12-01T02:25:54.000Z
util_common/nlp/Sumy/summarizers/lsa.py
cscyuge/pointer-generator
74b3b974e72209dc7a4045cabb758465998c920a
[ "MIT" ]
12
2019-04-02T12:25:40.000Z
2020-10-09T16:06:49.000Z
# -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import division, print_function, unicode_literals import math from warnings import warn try: import numpy except ImportError: numpy = None try: from numpy.linalg import svd as singular_value_decomposition except ImportError:...
34.983871
113
0.639696
from __future__ import absolute_import from __future__ import division, print_function, unicode_literals import math from warnings import warn try: import numpy except ImportError: numpy = None try: from numpy.linalg import svd as singular_value_decomposition except ImportError: singular_value_dec...
true
true
790bc205119844fcb221f48e4fbed1b6f813e3cf
16,006
py
Python
EFIT2D_Classes.py
guillaumedavidphd/efit2d-pyopencl
bf571f8de86aec710e92896e901322edc4ba31c1
[ "MIT" ]
9
2016-04-28T17:05:29.000Z
2020-07-24T09:22:28.000Z
EFIT2D_Classes.py
guillaumedavidphd/efit2d-pyopencl
bf571f8de86aec710e92896e901322edc4ba31c1
[ "MIT" ]
2
2019-11-01T22:12:49.000Z
2019-11-05T18:52:13.000Z
EFIT2D_Classes.py
guillaumedavidphd/efit2d-pyopencl
bf571f8de86aec710e92896e901322edc4ba31c1
[ "MIT" ]
1
2019-11-05T17:04:30.000Z
2019-11-05T17:04:30.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- """ @package EFIT2D_Classes Support Library: efit2d-pyopencl Manuscript Title: Optimized OpenCL implementation of the Elastodynamic Finite Integration Technique for viscoelastic media Authors: M Molero, U Iturraran-Viveros, S Aparicio, M.G. Hernández Program title: EF...
22.671388
167
0.642197
import numpy as np from math import sin, cos, sqrt, pi, exp import random import time from scipy import signal from scipy.fftpack import fftshift from skimage.transform import rotate try: from Image import Image except: from PIL import Image from matplotlib ...
true
true
790bc268fe1805820861572235668815eee79955
785
py
Python
workflow_lib/wwq_dbase.py
VUB-HYDR/2018_Chawanda_etal
46af26916806e2f61fd48d777f88b04da7fffbbe
[ "MIT" ]
14
2018-09-27T16:03:10.000Z
2021-04-15T06:09:21.000Z
workflow_lib/wwq_dbase.py
VUB-HYDR/2018_Chawanda_etal
46af26916806e2f61fd48d777f88b04da7fffbbe
[ "MIT" ]
2
2019-10-24T14:03:41.000Z
2019-10-31T22:10:19.000Z
workflow_lib/wwq_dbase.py
VUB-HYDR/2018_Chawanda_etal
46af26916806e2f61fd48d777f88b04da7fffbbe
[ "MIT" ]
7
2018-11-14T19:42:59.000Z
2021-08-16T07:09:50.000Z
import sys import cj_function_lib as cj import init_file as variables import mdbtools as mdt #print variables.ProjMDB #print variables.QSWAT_MDB wwqrng = cj.extract_table_from_mdb(variables.QSWAT_MDB, 'wwqrng', variables.path + "\\wwqrng.tmp~") wwq_defaults={} for record in wwqrng: # Getting a list of parameter n...
27.068966
99
0.719745
import sys import cj_function_lib as cj import init_file as variables import mdbtools as mdt wwqrng = cj.extract_table_from_mdb(variables.QSWAT_MDB, 'wwqrng', variables.path + "\\wwqrng.tmp~") wwq_defaults={} for record in wwqrng: if record.split(",")[0].strip(" ") != "": wwq_defaults[record.split(...
true
true
790bc387a653b8e5be169c257067dd014f119978
5,889
py
Python
graphnas/evolution_trainer.py
mhnnunes/nas_gnn
91092acfee9fdbbef3e22252040b80aa96143311
[ "Apache-2.0" ]
13
2020-07-29T12:45:22.000Z
2022-03-07T06:26:02.000Z
graphnas/evolution_trainer.py
mhnnunes/nas_gnn
91092acfee9fdbbef3e22252040b80aa96143311
[ "Apache-2.0" ]
null
null
null
graphnas/evolution_trainer.py
mhnnunes/nas_gnn
91092acfee9fdbbef3e22252040b80aa96143311
[ "Apache-2.0" ]
3
2020-09-27T06:43:17.000Z
2020-11-26T08:43:35.000Z
import time import torch import numpy as np from collections import deque from graphnas.trainer import Trainer class Evolution_Trainer(Trainer): """ This class implements the Asyncronous Aging Evolution, proposed by Real et. al. on: Regularized Evolution for Image Classifier Architecture Search ...
43.622222
95
0.626083
import time import torch import numpy as np from collections import deque from graphnas.trainer import Trainer class Evolution_Trainer(Trainer): def __init__(self, args): super(Evolution_Trainer, self).__init__(args) self.args = args self.random_seed = args.random_seed self.populat...
true
true
790bc3d560d420f92c41fd48572a93e3b284d13b
1,645
py
Python
src/game_of_life/python_coderetreat_socramob/cr_socramob08/coord_test.py
hemmerling/codingdojo
3e8860b78e96ac15cde6a12db3b2431e8b63714f
[ "Apache-2.0" ]
null
null
null
src/game_of_life/python_coderetreat_socramob/cr_socramob08/coord_test.py
hemmerling/codingdojo
3e8860b78e96ac15cde6a12db3b2431e8b63714f
[ "Apache-2.0" ]
null
null
null
src/game_of_life/python_coderetreat_socramob/cr_socramob08/coord_test.py
hemmerling/codingdojo
3e8860b78e96ac15cde6a12db3b2431e8b63714f
[ "Apache-2.0" ]
null
null
null
#This file was originally generated by PyScripter's unitest wizard import unittest from coord import Coord from cell import Cell from field import Field def dummy(): """ Dummy function for comparison of the return values """ return class CoordTest(unittest.TestCase): def setUp(self): ...
27.416667
124
0.616413
import unittest from coord import Coord from cell import Cell from field import Field def dummy(): return class CoordTest(unittest.TestCase): def setUp(self): self.field = Field() pass def tearDown(self): pass def testMain(self): self.coord = Coo...
true
true
790bc3fe57b4e903bf93fa21bde113be2508747e
9,883
py
Python
apps/qa/models.py
PremierLangage/premierlangage
7134a2aadffee2bf264abee6c4b23ea33f1b390b
[ "CECILL-B" ]
8
2019-01-30T13:51:59.000Z
2022-01-08T03:26:53.000Z
apps/qa/models.py
PremierLangage/premierlangage
7134a2aadffee2bf264abee6c4b23ea33f1b390b
[ "CECILL-B" ]
286
2019-01-18T21:35:51.000Z
2022-03-24T18:53:59.000Z
apps/qa/models.py
PremierLangage/premierlangage
7134a2aadffee2bf264abee6c4b23ea33f1b390b
[ "CECILL-B" ]
4
2019-02-11T13:38:30.000Z
2021-03-02T20:59:00.000Z
import math from django.conf import settings from django.db import models from django.db.models import F from django.db.models.signals import pre_delete from django.dispatch import receiver from django.utils.text import slugify from django_markdown.models import MarkdownField from hitcount.models import HitCountMixin ...
38.455253
99
0.641404
import math from django.conf import settings from django.db import models from django.db.models import F from django.db.models.signals import pre_delete from django.dispatch import receiver from django.utils.text import slugify from django_markdown.models import MarkdownField from hitcount.models import HitCountMixin ...
true
true
790bc421be922ae442f5ee89d52a6c4f31a4e50a
1,771
py
Python
generate_exampleA.py
xianruizhong/SpHAM
c85a5fe023bd0d760eb42c896cd57ecc07014087
[ "Apache-2.0" ]
2
2022-03-27T06:05:09.000Z
2022-03-29T08:37:36.000Z
generate_exampleA.py
FengxiangHe/SpHAM
c85a5fe023bd0d760eb42c896cd57ecc07014087
[ "Apache-2.0" ]
null
null
null
generate_exampleA.py
FengxiangHe/SpHAM
c85a5fe023bd0d760eb42c896cd57ecc07014087
[ "Apache-2.0" ]
1
2022-03-29T08:37:40.000Z
2022-03-29T08:37:40.000Z
import numpy as np def generate_A(filename1, filename2, noise = 'gau'): exp_T = 4000 big_y_true_gau = [] big_y_noise_gau = [] big_y_true_t2 = [] big_y_noise_t2 = [] for times in range(100): y_true_gau = np.zeros((exp_T, 1, 1)) y_true_gau[0] = np.random.rand() y_true_gau[1...
41.186047
117
0.570299
import numpy as np def generate_A(filename1, filename2, noise = 'gau'): exp_T = 4000 big_y_true_gau = [] big_y_noise_gau = [] big_y_true_t2 = [] big_y_noise_t2 = [] for times in range(100): y_true_gau = np.zeros((exp_T, 1, 1)) y_true_gau[0] = np.random.rand() y_true_gau[1...
true
true
790bc42e7e4be27668c3a9feff0e06386ec66ac7
1,332
py
Python
crawler/tweet.py
EliasSchramm/TwitterDB
237ed8424547a1e9283aec83d4f1dffabd8cb13d
[ "MIT" ]
1
2021-12-13T17:33:04.000Z
2021-12-13T17:33:04.000Z
crawler/tweet.py
EliasSchramm/TwitterDB
237ed8424547a1e9283aec83d4f1dffabd8cb13d
[ "MIT" ]
null
null
null
crawler/tweet.py
EliasSchramm/TwitterDB
237ed8424547a1e9283aec83d4f1dffabd8cb13d
[ "MIT" ]
null
null
null
import emoji import string class Tweet(): def __init__(self, text: str): self.text = text.lower() self.hashtags = self.find("#", forbidden="@") self.cleanTag() self.tags = self.find("@", forbidden="#") def find(self, prefix, forbidden): ret = [] _text = self.tex...
28.956522
105
0.512763
import emoji import string class Tweet(): def __init__(self, text: str): self.text = text.lower() self.hashtags = self.find("#", forbidden="@") self.cleanTag() self.tags = self.find("@", forbidden="#") def find(self, prefix, forbidden): ret = [] _text = self.tex...
true
true
790bc4345c5c6326334d97910c66fdd23fb02367
835
py
Python
bindings/python/src/test/test_rates_api.py
cloudsmith-io/cloudsmith-api
bc747fa6ee1d86485e334b08f65687630b3fd87c
[ "Apache-2.0" ]
9
2018-07-02T15:21:40.000Z
2021-11-24T03:44:39.000Z
bindings/python/src/test/test_rates_api.py
cloudsmith-io/cloudsmith-api
bc747fa6ee1d86485e334b08f65687630b3fd87c
[ "Apache-2.0" ]
8
2019-01-08T22:06:12.000Z
2022-03-16T15:02:37.000Z
bindings/python/src/test/test_rates_api.py
cloudsmith-io/cloudsmith-api
bc747fa6ee1d86485e334b08f65687630b3fd87c
[ "Apache-2.0" ]
1
2021-12-06T19:08:05.000Z
2021-12-06T19:08:05.000Z
# coding: utf-8 """ Cloudsmith API The API to the Cloudsmith Service OpenAPI spec version: v1 Contact: support@cloudsmith.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import os import sys import unittest import cloudsmith_api f...
18.555556
68
0.691018
from __future__ import absolute_import import os import sys import unittest import cloudsmith_api from cloudsmith_api.rest import ApiException from cloudsmith_api.apis.rates_api import RatesApi class TestRatesApi(unittest.TestCase): def setUp(self): self.api = cloudsmith_api.apis.rates_api.RatesApi...
true
true