hexsha
stringlengths
40
40
size
int64
2
1.02M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
⌀
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
⌀
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
⌀
max_issues_repo_path
stringlengths
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
⌀
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
⌀
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
⌀
max_forks_repo_path
stringlengths
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
⌀
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
⌀
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
⌀
content
stringlengths
2
1.02M
avg_line_length
float64
1
958k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
f765ef03e79c9a17d4dbfaa8efca453dfc7908d5
1,316
py
Python
ceo/sampling.py
trailofbits/ceo
d6a1ed729f8a1e400147b99dfcb65934e1924891
[ "Apache-2.0" ]
3
2020-05-05T13:08:53.000Z
2022-02-25T02:08:13.000Z
ceo/sampling.py
trailofbits/ceo
d6a1ed729f8a1e400147b99dfcb65934e1924891
[ "Apache-2.0" ]
null
null
null
ceo/sampling.py
trailofbits/ceo
d6a1ed729f8a1e400147b99dfcb65934e1924891
[ "Apache-2.0" ]
1
2022-02-25T02:10:20.000Z
2022-02-25T02:10:20.000Z
from sklearn.model_selection import ShuffleSplit, StratifiedShuffleSplit from sklearn.utils import shuffle as skshuffle def shuffle(x, random_state=None): return skshuffle(x, random_state=random_state) def split_shuffle(X,y=None, random_state=None): sss = ShuffleSplit(n_splits=1, test_size=0.25, random_state=...
24.830189
87
0.649696
from sklearn.model_selection import ShuffleSplit, StratifiedShuffleSplit from sklearn.utils import shuffle as skshuffle def shuffle(x, random_state=None): return skshuffle(x, random_state=random_state) def split_shuffle(X,y=None, random_state=None): sss = ShuffleSplit(n_splits=1, test_size=0.25, random_state=...
true
true
f765ef2fedef89cecaa1521da692705c5fdbf4b9
928
py
Python
app/user/views.py
Uladzimir1986/recipe-app-api
aecca3bee3932cf88334f994a8d66812575ccb25
[ "MIT" ]
null
null
null
app/user/views.py
Uladzimir1986/recipe-app-api
aecca3bee3932cf88334f994a8d66812575ccb25
[ "MIT" ]
null
null
null
app/user/views.py
Uladzimir1986/recipe-app-api
aecca3bee3932cf88334f994a8d66812575ccb25
[ "MIT" ]
null
null
null
from rest_framework import generics, authentication, permissions from rest_framework.authtoken.views import ObtainAuthToken from rest_framework.settings import api_settings from user.serializers import UserSerializer, AuthTokenSerializer class CreateUserView(generics.CreateAPIView): """Create a new user in the s...
33.142857
66
0.788793
from rest_framework import generics, authentication, permissions from rest_framework.authtoken.views import ObtainAuthToken from rest_framework.settings import api_settings from user.serializers import UserSerializer, AuthTokenSerializer class CreateUserView(generics.CreateAPIView): serializer_class = UserSerial...
true
true
f765ef6bc11a9e0afed553f9dee079198c1f20c7
542
bzl
Python
build_scripts/bazel/deps/setup_dependencies.bzl
GirlsOfSteelRobotics/GirlsOfSteelFRC
01694688ee9316cd93e243618ffbcb880051ef28
[ "BSD-3-Clause" ]
null
null
null
build_scripts/bazel/deps/setup_dependencies.bzl
GirlsOfSteelRobotics/GirlsOfSteelFRC
01694688ee9316cd93e243618ffbcb880051ef28
[ "BSD-3-Clause" ]
44
2021-11-09T23:23:48.000Z
2022-03-22T23:44:15.000Z
build_scripts/bazel/deps/setup_dependencies.bzl
GirlsOfSteelRobotics/GirlsOfSteelFRC
01694688ee9316cd93e243618ffbcb880051ef28
[ "BSD-3-Clause" ]
1
2021-11-19T03:45:21.000Z
2021-11-19T03:45:21.000Z
load("@rules_pmd//pmd:dependencies.bzl", "rules_pmd_dependencies") load("@bazelrio//:defs.bzl", "setup_bazelrio") load("@bazelrio//:deps.bzl", "setup_bazelrio_dependencies") def setup_dependencies(): rules_pmd_dependencies() setup_bazelrio_dependencies( toolchain_versions = "2022-1", wpilib_ver...
31.882353
66
0.643911
load("@rules_pmd//pmd:dependencies.bzl", "rules_pmd_dependencies") load("@bazelrio//:defs.bzl", "setup_bazelrio") load("@bazelrio//:deps.bzl", "setup_bazelrio_dependencies") def setup_dependencies(): rules_pmd_dependencies() setup_bazelrio_dependencies( toolchain_versions = "2022-1", wpilib_ver...
true
true
f765ef9227068eef78a3da6d60fb4933bb5b8eff
720
py
Python
SampleExtension/install.py
shridpant/azure-linux-extensions
4b5e66f33d5b93b15b427a9438931f0414f12a6e
[ "Apache-2.0" ]
266
2015-01-05T04:13:15.000Z
2022-03-24T17:52:51.000Z
SampleExtension/install.py
shridpant/azure-linux-extensions
4b5e66f33d5b93b15b427a9438931f0414f12a6e
[ "Apache-2.0" ]
703
2015-01-27T07:16:57.000Z
2022-03-29T09:01:23.000Z
SampleExtension/install.py
shridpant/azure-linux-extensions
4b5e66f33d5b93b15b427a9438931f0414f12a6e
[ "Apache-2.0" ]
276
2015-01-20T11:11:15.000Z
2022-03-24T12:40:49.000Z
#!/usr/bin/env python from Utils.WAAgentUtil import waagent import Utils.HandlerUtil as Util ExtensionShortName = "SampleExtension" def main(): #Global Variables definition waagent.LoggerInit('/var/log/waagent.log','/dev/stdout') waagent.Log("%s started to handle." %(ExtensionShortName)) operation =...
23.225806
62
0.701389
from Utils.WAAgentUtil import waagent import Utils.HandlerUtil as Util ExtensionShortName = "SampleExtension" def main(): waagent.LoggerInit('/var/log/waagent.log','/dev/stdout') waagent.Log("%s started to handle." %(ExtensionShortName)) operation = "install" status = "success" msg = "Instal...
true
true
f765efe131e3a624b4e3ef959aa66a729d678342
7,139
py
Python
tests/parse/test_parse_coordinates.py
bjhall/scout
ea772cf8d233223e0ec5271f61b95d3afcf719ad
[ "BSD-3-Clause" ]
null
null
null
tests/parse/test_parse_coordinates.py
bjhall/scout
ea772cf8d233223e0ec5271f61b95d3afcf719ad
[ "BSD-3-Clause" ]
null
null
null
tests/parse/test_parse_coordinates.py
bjhall/scout
ea772cf8d233223e0ec5271f61b95d3afcf719ad
[ "BSD-3-Clause" ]
null
null
null
from scout.parse.variant.coordinates import ( get_cytoband_coordinates, get_sub_category, get_length, get_end, parse_coordinates, ) class CyvcfVariant(object): """Mock a cyvcf variant Default is to return a variant with three individuals high genotype quality. """ def __...
23.639073
86
0.639305
from scout.parse.variant.coordinates import ( get_cytoband_coordinates, get_sub_category, get_length, get_end, parse_coordinates, ) class CyvcfVariant(object): def __init__( self, chrom="1", pos=80000, ref="A", alt="C", end=None, gt_qual...
true
true
f765f1538024ea2c89ca3c33dc30aaf5efa6b4f4
4,005
py
Python
fcp3/redirect.py
freenet/pyFreenet
0aefb6c8399483d74f04182b123328ff066d4e35
[ "MIT" ]
54
2015-03-06T16:00:16.000Z
2022-03-14T15:45:49.000Z
fcp3/redirect.py
PineappleClout/pyFreenet
b5b0baf2eceab995743a53b27dc1193e6e030e0e
[ "MIT" ]
17
2015-02-21T23:16:21.000Z
2021-11-23T00:12:40.000Z
fcp3/redirect.py
PineappleClout/pyFreenet
b5b0baf2eceab995743a53b27dc1193e6e030e0e
[ "MIT" ]
19
2015-03-11T11:42:24.000Z
2022-03-19T13:55:50.000Z
#@+leo-ver=4 #@+node:@file redirect.py """ Insert a redirect from a uri to an existing URI This is the guts of the command-line front-end app fcpredirect Example usage: $ fcpredirect KSK@darknet USK@PFeLTa1si2Ml5sDeUy7eDhPso6TPdmw-2gWfQ4Jg02w,3ocfrqgUMVWA2PeorZx40TW0c-FiIOL-TWKQHoDbVdE,AQABAAE/Index/35/ Inserts key...
25.673077
135
0.574532
import sys, os, getopt, traceback, mimetypes from . import node progname = sys.argv[0] def usage(msg=None, ret=1): if msg: sys.stderr.write(msg+"\n") sys.stderr.write("Usage: %s [options] src-uri target-uri\n" % progname) sys.stderr.write("Type '%s -h' for help\n" % progname) sys.exit(ret) ...
true
true
f765f1a111bf7213f7c5fee451a7d0a9c2ab5c9e
1,932
py
Python
modules/exceptions.py
Keyruu/miso-bot
4107a2869c3b4c84abb8ecbd11ba8d4429c94896
[ "MIT" ]
47
2019-10-29T08:27:47.000Z
2022-03-19T20:32:28.000Z
modules/exceptions.py
Keyruu/miso-bot
4107a2869c3b4c84abb8ecbd11ba8d4429c94896
[ "MIT" ]
16
2019-11-11T17:42:49.000Z
2022-03-29T13:31:31.000Z
modules/exceptions.py
Keyruu/miso-bot
4107a2869c3b4c84abb8ecbd11ba8d4429c94896
[ "MIT" ]
38
2020-03-25T03:50:57.000Z
2022-03-20T20:31:12.000Z
from discord.ext import commands class Info(commands.CommandError): def __init__(self, message, **kwargs): super().__init__(message) self.kwargs = kwargs class Warning(commands.CommandError): def __init__(self, message, **kwargs): super().__init__(message) self.kwargs = kwarg...
25.090909
97
0.681159
from discord.ext import commands class Info(commands.CommandError): def __init__(self, message, **kwargs): super().__init__(message) self.kwargs = kwargs class Warning(commands.CommandError): def __init__(self, message, **kwargs): super().__init__(message) self.kwargs = kwarg...
true
true
f765f22ccaa7d07b8aa00d2e128367a2105a3be4
833
py
Python
LoopStructural/visualisation/__init__.py
Loop3D/LoopStructural
f2b9fdc2cfd25e670358e2ff1850f6a362c637c5
[ "MIT" ]
67
2020-06-25T06:50:58.000Z
2022-03-29T17:15:43.000Z
LoopStructural/visualisation/__init__.py
Loop3D/LoopStructural
f2b9fdc2cfd25e670358e2ff1850f6a362c637c5
[ "MIT" ]
60
2020-06-28T22:58:21.000Z
2022-03-24T01:30:59.000Z
LoopStructural/visualisation/__init__.py
Loop3D/LoopStructural
f2b9fdc2cfd25e670358e2ff1850f6a362c637c5
[ "MIT" ]
9
2020-06-25T13:07:39.000Z
2021-12-01T01:41:24.000Z
""" Visualisation ============= """ from ..utils import getLogger logger = getLogger(__name__) try: import matplotlib from .map_viewer import MapView from .rotation_angle_plotter import RotationAnglePlotter except ImportError: logger.warning('Cannot use MapView or RotationAnglePlotter as matplotlib is ...
29.75
99
0.745498
from ..utils import getLogger logger = getLogger(__name__) try: import matplotlib from .map_viewer import MapView from .rotation_angle_plotter import RotationAnglePlotter except ImportError: logger.warning('Cannot use MapView or RotationAnglePlotter as matplotlib is not installed. \n'\ ...
true
true
f765f2be9fba32e3db62a98dac3bc1f545f9ff9a
11,564
py
Python
ambari-client/src/main/python/ambari_client/model/cluster.py
flipkart-incubator/incubator-ambari
bf747346312170834c6beb89a60c8624b47aa288
[ "Apache-2.0" ]
2
2018-06-06T14:21:11.000Z
2018-06-06T14:22:50.000Z
ambari-client/src/main/python/ambari_client/model/cluster.py
boydos/incubator-ambari
e10d85756dd55729c20aeda2baa0d6c93c4ca31d
[ "Apache-2.0" ]
1
2021-11-04T13:31:30.000Z
2021-11-04T13:31:30.000Z
ambari-client/src/main/python/ambari_client/model/cluster.py
isabella232/incubator-ambari
bf747346312170834c6beb89a60c8624b47aa288
[ "Apache-2.0" ]
9
2016-01-08T21:11:06.000Z
2021-11-10T16:05:51.000Z
# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you m...
35.148936
133
0.721982
import logging import time from ambari_client.model.base_model import BaseModel , ModelList from ambari_client.model import service , host , paths , status, configuration , utils LOG = logging.getLogger(__name__) def _get_cluster(resource_root, cluster_name): dic = resource_root.get("%s/%s" % (paths.CLUSTERS_PA...
true
true
f765f2cb6eadc7fdfcb1bf9be68b80914a2c9759
2,855
py
Python
exchanges/__init__.py
soulmachine/crypto-market-data
9bd5bf9e6715051c0a12a02fc56e4b8917a364ba
[ "Apache-2.0" ]
null
null
null
exchanges/__init__.py
soulmachine/crypto-market-data
9bd5bf9e6715051c0a12a02fc56e4b8917a364ba
[ "Apache-2.0" ]
null
null
null
exchanges/__init__.py
soulmachine/crypto-market-data
9bd5bf9e6715051c0a12a02fc56e4b8917a364ba
[ "Apache-2.0" ]
null
null
null
from typing import Any, Dict, List, Union from .binance import fetch_markets as binance_fetch_markets from .bitfinex import fetch_markets as bitfinex_fetch_markets from .bitget import fetch_markets as bitget_fetch_markets from .bithumb import fetch_markets as bithumb_fetch_markets from .bitmex import fetch_markets as ...
43.257576
87
0.758669
from typing import Any, Dict, List, Union from .binance import fetch_markets as binance_fetch_markets from .bitfinex import fetch_markets as bitfinex_fetch_markets from .bitget import fetch_markets as bitget_fetch_markets from .bithumb import fetch_markets as bithumb_fetch_markets from .bitmex import fetch_markets as ...
true
true
f765f2f4bd68b536f2d763bcafae1a55ac8eaf22
1,366
py
Python
drlnd/core/agents/base_agent.py
yycho0108/DRLND_Core
79117bd933b6cbf9f74e3356f5e1b8b156173cdc
[ "MIT" ]
null
null
null
drlnd/core/agents/base_agent.py
yycho0108/DRLND_Core
79117bd933b6cbf9f74e3356f5e1b8b156173cdc
[ "MIT" ]
null
null
null
drlnd/core/agents/base_agent.py
yycho0108/DRLND_Core
79117bd933b6cbf9f74e3356f5e1b8b156173cdc
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 from abc import ABC, abstractmethod class AgentBase(ABC): def __init__(self): """ Initialize agent. Params ====== """ pass @abstractmethod def select_action(self, state): """ Given the state, select an action. Params ...
27.32
80
0.614934
from abc import ABC, abstractmethod class AgentBase(ABC): def __init__(self): pass @abstractmethod def select_action(self, state): raise NotImplementedError('Cannot call abstract method select_action') @abstractmethod def step(self, state, action, reward, next_state, done): ...
true
true
f765f30c73cef5ea354bce4c965d0caaec7b94c3
2,981
py
Python
Python/ex3/ex3.py
xAbdalla/Machine_Learning_Exercises-Stanford_University
2b38413e91948b5d2614407ac9b62a60acd191d2
[ "MIT" ]
null
null
null
Python/ex3/ex3.py
xAbdalla/Machine_Learning_Exercises-Stanford_University
2b38413e91948b5d2614407ac9b62a60acd191d2
[ "MIT" ]
null
null
null
Python/ex3/ex3.py
xAbdalla/Machine_Learning_Exercises-Stanford_University
2b38413e91948b5d2614407ac9b62a60acd191d2
[ "MIT" ]
null
null
null
import numpy as np from scipy.io import loadmat from scipy.optimize import fmin_cg # Ignore overflow and divide by zero of np.log() and np.exp() # np.seterr(divide = 'ignore') # np.seterr(over = 'ignore') def sigmoid(z): return 1.0 / (1.0 + np.exp(-z)) def computeCost(theta, X, y, lamba=1): m = len(y) ...
30.418367
89
0.513251
import numpy as np from scipy.io import loadmat from scipy.optimize import fmin_cg def sigmoid(z): return 1.0 / (1.0 + np.exp(-z)) def computeCost(theta, X, y, lamba=1): m = len(y) h = sigmoid( X.dot( theta ) ) unreg_cost = (( np.log( h ).dot( -y ) ) - (( np.log( 1. - h ).dot( 1. - y ) ))) / m ...
true
true
f765f42a2fecb1318c461bdb2c453e061d90f466
265
py
Python
MovieRecommendationApp/web/forms.py
mohamedshabban/Movies-Recommendation
34144a8124fed4dceb0762897d5849babfa43aec
[ "Apache-2.0" ]
null
null
null
MovieRecommendationApp/web/forms.py
mohamedshabban/Movies-Recommendation
34144a8124fed4dceb0762897d5849babfa43aec
[ "Apache-2.0" ]
null
null
null
MovieRecommendationApp/web/forms.py
mohamedshabban/Movies-Recommendation
34144a8124fed4dceb0762897d5849babfa43aec
[ "Apache-2.0" ]
null
null
null
from django.contrib.auth.models import User from django import forms class UserForm(forms.ModelForm): password = forms.CharField(widget=forms.PasswordInput) class Meta: model = User fields = ['username', 'email', 'password']
13.25
58
0.664151
from django.contrib.auth.models import User from django import forms class UserForm(forms.ModelForm): password = forms.CharField(widget=forms.PasswordInput) class Meta: model = User fields = ['username', 'email', 'password']
true
true
f765f42b5f8de74036ee61d404974f001c24a42a
330
py
Python
mugimugi_client_api/__init__.py
JeanMarc-Moly/mugimugi_client_api
d566ce5e462108858d2b4960bbd968b8e77e2540
[ "OML" ]
null
null
null
mugimugi_client_api/__init__.py
JeanMarc-Moly/mugimugi_client_api
d566ce5e462108858d2b4960bbd968b8e77e2540
[ "OML" ]
null
null
null
mugimugi_client_api/__init__.py
JeanMarc-Moly/mugimugi_client_api
d566ce5e462108858d2b4960bbd968b8e77e2540
[ "OML" ]
null
null
null
from ._client import MugiMugiClient from .add_book_to_user_list import AddBookToUserList from .enum import * from .get_item_by_id import * from .remove_book_from_user_list import RemoveBookFromUserList from .search_image import SearchImage from .search_item import * from .search_object import SearchObject from .vote im...
33
62
0.854545
from ._client import MugiMugiClient from .add_book_to_user_list import AddBookToUserList from .enum import * from .get_item_by_id import * from .remove_book_from_user_list import RemoveBookFromUserList from .search_image import SearchImage from .search_item import * from .search_object import SearchObject from .vote im...
true
true
f765f74845346c3a83f2f89b66a45e4889812640
26,494
py
Python
kedro/io/core.py
martinlarsalbert/kedro
c2c984a260132cdb9c434099485eae05707ad116
[ "Apache-2.0" ]
1
2021-11-25T12:33:13.000Z
2021-11-25T12:33:13.000Z
kedro/io/core.py
martinlarsalbert/kedro
c2c984a260132cdb9c434099485eae05707ad116
[ "Apache-2.0" ]
null
null
null
kedro/io/core.py
martinlarsalbert/kedro
c2c984a260132cdb9c434099485eae05707ad116
[ "Apache-2.0" ]
null
null
null
"""This module provides a set of classes which underpin the data loading and saving functionality provided by ``kedro.io``. """ import abc import copy import logging import re import warnings from collections import namedtuple from datetime import datetime, timezone from functools import partial from glob import iglob...
35.802703
96
0.614554
import abc import copy import logging import re import warnings from collections import namedtuple from datetime import datetime, timezone from functools import partial from glob import iglob from operator import attrgetter from pathlib import Path, PurePath, PurePosixPath from typing import Any, Callable, Dict, List,...
true
true
f765f77f12f0d72f76a84292cd358213eb53c61d
8,590
py
Python
analyse/textsum_manhua_sum.py
zwhinmedia/TextRank
781327a247534c33b3276e7fd74b2e33b8ce6155
[ "Apache-2.0" ]
3
2017-03-26T01:47:22.000Z
2018-04-15T15:58:31.000Z
analyse/textsum_manhua_sum.py
zwhinmedia/TextRank
781327a247534c33b3276e7fd74b2e33b8ce6155
[ "Apache-2.0" ]
null
null
null
analyse/textsum_manhua_sum.py
zwhinmedia/TextRank
781327a247534c33b3276e7fd74b2e33b8ce6155
[ "Apache-2.0" ]
1
2020-02-03T22:20:42.000Z
2020-02-03T22:20:42.000Z
#! /usr/bin/env python #-*- encoding:utf-8 -*- import sys import re try: reload(sys) sys.setdefaultencoding('utf-8') except: pass import codecs from textrank4zh import TextRank4Sentence def get_textrank(filename, filtername): # replace the items to blackspace parten = "“|”|'|-|\"".decode('utf-8'...
33.818898
158
0.516647
import sys import re try: reload(sys) sys.setdefaultencoding('utf-8') except: pass import codecs from textrank4zh import TextRank4Sentence def get_textrank(filename, filtername): parten = "“|”|'|-|\"".decode('utf-8') parten1 = "—|~".decode('utf-8') # get the filter to delete sentenc...
false
true
f765f86445cedb15cb2aef9804af3fc944972abf
5,000
py
Python
uhd_restpy/testplatform/sessions/ixnetwork/topology/tlvprofile/tlvprofile_69db000d3ef3b060f5edc387b878736c.py
Vibaswan/ixnetwork_restpy
239fedc7050890746cbabd71ea1e91c68d9e5cad
[ "MIT" ]
null
null
null
uhd_restpy/testplatform/sessions/ixnetwork/topology/tlvprofile/tlvprofile_69db000d3ef3b060f5edc387b878736c.py
Vibaswan/ixnetwork_restpy
239fedc7050890746cbabd71ea1e91c68d9e5cad
[ "MIT" ]
null
null
null
uhd_restpy/testplatform/sessions/ixnetwork/topology/tlvprofile/tlvprofile_69db000d3ef3b060f5edc387b878736c.py
Vibaswan/ixnetwork_restpy
239fedc7050890746cbabd71ea1e91c68d9e5cad
[ "MIT" ]
null
null
null
# MIT LICENSE # # Copyright 1997 - 2020 by IXIA Keysight # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify,...
40.983607
169
0.6898
from uhd_restpy.base import Base from uhd_restpy.files import Files class TlvProfile(Base): __slots__ = () _SDM_NAME = 'tlvProfile' _SDM_ATT_MAP = { } def __init__(self, parent): super(TlvProfile, self).__init__(parent) @property def DefaultTlv(self): from uhd_restpy.tes...
true
true
f765f891ad7c363c6ced70a654691563fe7a5f2d
1,710
py
Python
sillyfacter/filesystem.py
hihellobolke/sillyfacter
9829e6eee107957955db1b3a33ac571054013bdf
[ "Apache-1.1" ]
3
2015-11-10T19:31:51.000Z
2017-01-25T00:25:19.000Z
sillyfacter/filesystem.py
hihellobolke/sillyfacter
9829e6eee107957955db1b3a33ac571054013bdf
[ "Apache-1.1" ]
null
null
null
sillyfacter/filesystem.py
hihellobolke/sillyfacter
9829e6eee107957955db1b3a33ac571054013bdf
[ "Apache-1.1" ]
null
null
null
from __future__ import print_function from __future__ import absolute_import import psutil import os import platform import re import logging import inspect from .common import * import sillyfacter.config MODULEFILE = re.sub('\.py', '', os.path.basename(inspect.stack()[0][1])) def fetch(...
34.2
79
0.553801
from __future__ import print_function from __future__ import absolute_import import psutil import os import platform import re import logging import inspect from .common import * import sillyfacter.config MODULEFILE = re.sub('\.py', '', os.path.basename(inspect.stack()[0][1])) def fetch(...
true
true
f765f96725574e209d91667fa7f557d3d60013ed
1,045
py
Python
mars/worker/__init__.py
wdkwyf/mars
3f750e360e64380eab779301a5103994d4886b6a
[ "Apache-2.0" ]
null
null
null
mars/worker/__init__.py
wdkwyf/mars
3f750e360e64380eab779301a5103994d4886b6a
[ "Apache-2.0" ]
null
null
null
mars/worker/__init__.py
wdkwyf/mars
3f750e360e64380eab779301a5103994d4886b6a
[ "Apache-2.0" ]
null
null
null
# Copyright 1999-2018 Alibaba Group Holding 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 a...
40.192308
74
0.803828
from .calc import CpuCalcActor from .chunkholder import ChunkHolderActor, ensure_chunk from .daemon import WorkerDaemonActor from .dispatcher import DispatchActor from .events import EventsActor from .execution import ExecutionActor, ExecutionState from .prochelper import ProcessHelperActor from .quota import QuotaAct...
true
true
f765f98516f453cdb4ca0b678b6e3cb5e903d817
4,480
py
Python
py4we/dakota.py
gtpedrosa/Python4WindEnergy
f8ad09018420cfb3a419173f97b129de7118d814
[ "Apache-2.0" ]
48
2015-01-19T18:21:10.000Z
2021-11-27T22:41:06.000Z
py4we/dakota.py
arash7444/Python4WindEnergy
8f97a5f86e81ce01d80dafb6f8104165fd3ad397
[ "Apache-2.0" ]
1
2016-05-24T06:07:07.000Z
2016-05-24T08:26:29.000Z
py4we/dakota.py
arash7444/Python4WindEnergy
8f97a5f86e81ce01d80dafb6f8104165fd3ad397
[ "Apache-2.0" ]
24
2015-06-26T14:44:07.000Z
2021-06-07T18:36:52.000Z
""" IO classes for YOUR_FILE_TYPE_NAME file types Copyright (C) 2013 DTU Wind Energy Author: Juan Pablo Murcia Email: jumu@dtu.dk Last revision: 28.01.2014 License: Apache v2.0, http://www.apache.org/licenses/LICENSE-2.0 """ from __future__ import print_function from we_file_io import WEFileIO, TestWE...
29.668874
103
0.512277
from __future__ import print_function from we_file_io import WEFileIO, TestWEFileIO import unittest import matplotlib.pyplot as plt class DakotaTabFileIO(WEFileIO): def _write(self): n_col = len(self.data) n_row = len(self.data[self.keys[0]]) data = list() for i_row ...
true
true
f765f9bac2270166a2eaac143b149b04567c3e80
12,237
py
Python
runner/qm8_runner.py
teddylfwu/LanczosNetwork
adb82d9bce4b14040952565708273eb7e6738d3c
[ "MIT" ]
1
2021-03-16T08:51:58.000Z
2021-03-16T08:51:58.000Z
runner/qm8_runner.py
teddylfwu/LanczosNetwork
adb82d9bce4b14040952565708273eb7e6738d3c
[ "MIT" ]
null
null
null
runner/qm8_runner.py
teddylfwu/LanczosNetwork
adb82d9bce4b14040952565708273eb7e6738d3c
[ "MIT" ]
null
null
null
from __future__ import (division, print_function) import os import numpy as np import pickle from collections import defaultdict from tqdm import tqdm import torch import torch.nn as nn import torch.utils.data import torch.optim as optim from torch.utils.data import Dataset, DataLoader from tensorboardX import Summary...
34.277311
80
0.547356
from __future__ import (division, print_function) import os import numpy as np import pickle from collections import defaultdict from tqdm import tqdm import torch import torch.nn as nn import torch.utils.data import torch.optim as optim from torch.utils.data import Dataset, DataLoader from tensorboardX import Summary...
true
true
f765f9bed85b91155e62fa45f76703b024cde8aa
12,596
py
Python
domainbed/datasets.py
zhuwenzhen/DomainBed
e8e8ed831bf30887675e5b3a5117d9d66d0ee46f
[ "MIT" ]
null
null
null
domainbed/datasets.py
zhuwenzhen/DomainBed
e8e8ed831bf30887675e5b3a5117d9d66d0ee46f
[ "MIT" ]
null
null
null
domainbed/datasets.py
zhuwenzhen/DomainBed
e8e8ed831bf30887675e5b3a5117d9d66d0ee46f
[ "MIT" ]
null
null
null
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved import os import torch from PIL import Image, ImageFile from torchvision import transforms import torchvision.datasets.folder from torch.utils.data import TensorDataset, Subset from torchvision.datasets import MNIST, ImageFolder from torchvision.tr...
31.411471
97
0.60813
import os import torch from PIL import Image, ImageFile from torchvision import transforms import torchvision.datasets.folder from torch.utils.data import TensorDataset, Subset from torchvision.datasets import MNIST, ImageFolder from torchvision.transforms.functional import rotate from wilds.datasets.camelyon17_datas...
true
true
f765fa62c4dcf37b017b292a269e99c7636ec6d2
1,094
py
Python
blocking_executor.py
AoEiuV020/NotionImportKeep
c4633e25736b0b6315185705e969405ae27f9224
[ "MIT" ]
2
2021-02-05T11:39:16.000Z
2022-01-02T03:40:27.000Z
blocking_executor.py
AoEiuV020/NotionImportKeep
c4633e25736b0b6315185705e969405ae27f9224
[ "MIT" ]
null
null
null
blocking_executor.py
AoEiuV020/NotionImportKeep
c4633e25736b0b6315185705e969405ae27f9224
[ "MIT" ]
null
null
null
import os import queue import traceback from concurrent.futures import ThreadPoolExecutor class BlockingExecutor: def __init__(self, thread_count, cache_size): if cache_size <= 0: raise ValueError('cache_size must > 0') self.finish = False self.executor = ThreadPoolExecutor(thr...
29.567568
87
0.595064
import os import queue import traceback from concurrent.futures import ThreadPoolExecutor class BlockingExecutor: def __init__(self, thread_count, cache_size): if cache_size <= 0: raise ValueError('cache_size must > 0') self.finish = False self.executor = ThreadPoolExecutor(thr...
true
true
f765fa9fd88f7d78ff59727aae94be1087ffc2f8
721
py
Python
iclientpy/test/viz/test_abstractmap.py
SuperMap/iClientPython
5e741c1efda9b12d321909428bd5c95e22482ea7
[ "Apache-2.0" ]
28
2018-04-19T07:11:34.000Z
2022-02-24T08:31:08.000Z
iclientpy/test/viz/test_abstractmap.py
SuperMap/iClientPython
5e741c1efda9b12d321909428bd5c95e22482ea7
[ "Apache-2.0" ]
3
2019-05-06T07:58:45.000Z
2020-11-18T21:16:38.000Z
iclientpy/test/viz/test_abstractmap.py
SuperMap/iClientPython
5e741c1efda9b12d321909428bd5c95e22482ea7
[ "Apache-2.0" ]
8
2018-06-14T02:29:53.000Z
2020-11-03T01:36:35.000Z
from unittest import TestCase, mock from iclientpy import AbstractMap class AbstractMapTestCase(TestCase): def test_compute_bounds(self): data = [[1, 2, 3], [4, 5, 6]] lat_key = lambda d: d[0] lng_key = lambda d: d[1] map = AbstractMap() result = map.compute_bound...
32.772727
60
0.583911
from unittest import TestCase, mock from iclientpy import AbstractMap class AbstractMapTestCase(TestCase): def test_compute_bounds(self): data = [[1, 2, 3], [4, 5, 6]] lat_key = lambda d: d[0] lng_key = lambda d: d[1] map = AbstractMap() result = map.compute_bound...
true
true
f765faed0351fbd614af04806cd5c385f77a6b81
1,115
py
Python
libs/create_VOC_dirs.py
Zhehua-Hu/Enchain
94bb21f8ff627fab7d28ca15b575ba01710fb579
[ "Apache-2.0" ]
12
2017-02-20T05:54:12.000Z
2020-02-13T18:26:29.000Z
libs/create_VOC_dirs.py
Zhehua-Hu/-nchain
94bb21f8ff627fab7d28ca15b575ba01710fb579
[ "Apache-2.0" ]
null
null
null
libs/create_VOC_dirs.py
Zhehua-Hu/-nchain
94bb21f8ff627fab7d28ca15b575ba01710fb579
[ "Apache-2.0" ]
3
2017-02-23T06:35:13.000Z
2020-06-18T07:06:17.000Z
#!/usr/bin/python # coding=utf-8 """ """ import argparse import os, sys from .pipeline_tools import make_perfect_path def create_VOC_dirs(dir_name): dir_name_ = make_perfect_path(dir_name) # print(dir_name_) # print(type(dir_name_)) if not os.path.exists(dir_name_): os.system("mkdir " + dir_name_) os.system(...
29.342105
79
0.732735
import argparse import os, sys from .pipeline_tools import make_perfect_path def create_VOC_dirs(dir_name): dir_name_ = make_perfect_path(dir_name) if not os.path.exists(dir_name_): os.system("mkdir " + dir_name_) os.system("mkdir " + dir_name_ + "/Annotations") os.system("mkdir " + dir_name_ + "/ImageSets"...
true
true
f765fbbe8d8cb45b4fdcecf4119ddca07c5778ce
1,050
py
Python
ode/resources/source.py
LiberTIC/ODE
291fd23c94847e3f5e2f31bc95241ecc111abe7f
[ "BSD-3-Clause" ]
2
2015-01-13T15:06:16.000Z
2016-08-17T12:49:45.000Z
ode/resources/source.py
LiberTIC/ODE
291fd23c94847e3f5e2f31bc95241ecc111abe7f
[ "BSD-3-Clause" ]
null
null
null
ode/resources/source.py
LiberTIC/ODE
291fd23c94847e3f5e2f31bc95241ecc111abe7f
[ "BSD-3-Clause" ]
null
null
null
from cornice.resource import resource, view from ode.models import Source from ode.resources.base import ResourceMixin, set_content_type from ode.resources.base import COLLECTION_JSON_MIMETYPE from ode.validation.schema import SourceCollectionSchema from ode.validation.validators import has_provider_id from ode.valida...
35
70
0.781905
from cornice.resource import resource, view from ode.models import Source from ode.resources.base import ResourceMixin, set_content_type from ode.resources.base import COLLECTION_JSON_MIMETYPE from ode.validation.schema import SourceCollectionSchema from ode.validation.validators import has_provider_id from ode.valida...
true
true
f765fceb9d53ca36913754339081f2c433f71c9c
7,152
py
Python
chapter07/03_WindyGridWorld_nStepSARSA_OffPolicy.py
cemkaraoguz/reinforcement-learning-an-introduction-second-edition
735bfa6b66ffb52b7cf03966164e7bc1755942de
[ "MIT" ]
1
2022-03-01T11:48:55.000Z
2022-03-01T11:48:55.000Z
chapter07/03_WindyGridWorld_nStepSARSA_OffPolicy.py
cemkaraoguz/reinforcement-learning-an-introduction-second-edition
735bfa6b66ffb52b7cf03966164e7bc1755942de
[ "MIT" ]
null
null
null
chapter07/03_WindyGridWorld_nStepSARSA_OffPolicy.py
cemkaraoguz/reinforcement-learning-an-introduction-second-edition
735bfa6b66ffb52b7cf03966164e7bc1755942de
[ "MIT" ]
null
null
null
''' 03_WindyGridWorld_nStepSARSA_OffPolicy.py : n-step off-policy SARSA applied to Windy Grid World problem (Example 6.5) Cem Karaoguz, 2020 MIT License ''' import numpy as np import pylab as pl from IRL.environments.Gridworlds import StochasticGridWorld from IRL.agents.TemporalDifferenceLearning import nStepOffPoli...
38.869565
152
0.699385
import numpy as np import pylab as pl from IRL.environments.Gridworlds import StochasticGridWorld from IRL.agents.TemporalDifferenceLearning import nStepOffPolicySARSA from IRL.utils.Policies import StochasticPolicy from IRL.utils.Helpers import runSimulation def runExperiment(nEpisodes, env, agent, policy_behaviour...
true
true
f765fd342cc2132a222e59112c740776dfe05162
4,046
py
Python
infixTosuffix.py
AndyVirginia/-
3d83fa3682b7d3a8f1e6d45e66b640911c99218d
[ "MIT" ]
4
2018-09-27T16:47:21.000Z
2019-09-28T01:52:00.000Z
infixTosuffix.py
AndyVirginia/-
3d83fa3682b7d3a8f1e6d45e66b640911c99218d
[ "MIT" ]
null
null
null
infixTosuffix.py
AndyVirginia/-
3d83fa3682b7d3a8f1e6d45e66b640911c99218d
[ "MIT" ]
2
2018-12-19T02:43:52.000Z
2020-01-18T05:41:00.000Z
import Stack from fractions import Fraction class infix_to_suffix: def __init__(self): self.list_operators = ["+", "-", "×", "÷", "(", ")", "="] self.pri_operators = {"+": 0, "-": 0, "×": 1, "÷": 1} def to_suffix_expression(self, expression): '''生成逆波兰表达式''' stack_operator = St...
43.978261
116
0.419427
import Stack from fractions import Fraction class infix_to_suffix: def __init__(self): self.list_operators = ["+", "-", "×", "÷", "(", ")", "="] self.pri_operators = {"+": 0, "-": 0, "×": 1, "÷": 1} def to_suffix_expression(self, expression): stack_operator = Stack.Stack() suf...
true
true
f765fea8bf25d6487223d89132e388ec92706958
974
py
Python
code/enregistrement.py
myhumankit/bracelet-universel
1c4a99aeaed10f9dccbcff04085dce41fd26211e
[ "MIT" ]
null
null
null
code/enregistrement.py
myhumankit/bracelet-universel
1c4a99aeaed10f9dccbcff04085dce41fd26211e
[ "MIT" ]
null
null
null
code/enregistrement.py
myhumankit/bracelet-universel
1c4a99aeaed10f9dccbcff04085dce41fd26211e
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # librairies import sys import time import serial # connexion au bracelet bracelet = serial.Serial('/dev/ttyUSB0', 115200, timeout=1) # nombre de données enregistrées data_number = 1000 # ouverture du fichier en écriture file_name = str(int(time.time())) if len(sys.argv...
22.651163
91
0.686858
import sys import time import serial bracelet = serial.Serial('/dev/ttyUSB0', 115200, timeout=1) data_number = 1000 file_name = str(int(time.time())) if len(sys.argv) == 2: file_name = file_name + '_' + sys.argv[1] file_name = file_name + ".txt" data = open('samples/' + file_name, "w") start_time = time.time()...
true
true
f765ff80435abd9eb31e13b1a19f342b7e688a15
3,630
py
Python
pypeit/tests/test_match.py
rcooke-ast/PYPIT
0cb9c4cb422736b855065a35aefc2bdba6d51dd0
[ "BSD-3-Clause" ]
null
null
null
pypeit/tests/test_match.py
rcooke-ast/PYPIT
0cb9c4cb422736b855065a35aefc2bdba6d51dd0
[ "BSD-3-Clause" ]
null
null
null
pypeit/tests/test_match.py
rcooke-ast/PYPIT
0cb9c4cb422736b855065a35aefc2bdba6d51dd0
[ "BSD-3-Clause" ]
null
null
null
""" Module to run tests on sort and arsetup """ from IPython import embed import pytest import numpy as np from pypeit.core import framematch from pypeit.tests.tstutils import dummy_fitstbl from pypeit.pypmsgs import PypeItError @pytest.fixture def fitstbl(): return dummy_fitstbl() def test_frame_selection(f...
34.571429
94
0.669146
from IPython import embed import pytest import numpy as np from pypeit.core import framematch from pypeit.tests.tstutils import dummy_fitstbl from pypeit.pypmsgs import PypeItError @pytest.fixture def fitstbl(): return dummy_fitstbl() def test_frame_selection(fitstbl): assert fitstbl.find_frames('bia...
true
true
f76600352f63676208c0ac0c8e9f8379b1fdac1b
13,792
py
Python
src/m3_capital_t_class.py
berlinlr/10-MoreImplementingClasses-201930
6b34a39951bd1c0c3af724b0a0caa48d0853f031
[ "MIT" ]
null
null
null
src/m3_capital_t_class.py
berlinlr/10-MoreImplementingClasses-201930
6b34a39951bd1c0c3af724b0a0caa48d0853f031
[ "MIT" ]
null
null
null
src/m3_capital_t_class.py
berlinlr/10-MoreImplementingClasses-201930
6b34a39951bd1c0c3af724b0a0caa48d0853f031
[ "MIT" ]
null
null
null
""" A CapitalT class and functions that use/test it. Authors: David Mutchler, Vibha Alangar, Matt Boutell, Dave Fisher, Mark Hays, Amanda Stouder, Aaron Wilkin, their colleagues, and Landen Berlin. """ # Done: 1. PUT YOUR NAME IN THE ABOVE LINE. import rosegraphics as rg def main(): """ ...
42.17737
261
0.532773
import rosegraphics as rg def main(): print('Un-comment the calls in MAIN one by one') print(' to run the testing code as you complete the TODOs.') def run_test_simple_t(): print() print('--------------------------------------------------') print('Testing __init_...
true
true
f766031bf87b03557eb796040f5ef46a1b99b805
17,523
py
Python
django/contrib/admin/views/main.py
webjunkie/django
5dbca13f3baa2e1bafd77e84a80ad6d8a074712e
[ "BSD-3-Clause" ]
1
2019-03-14T03:06:49.000Z
2019-03-14T03:06:49.000Z
django/contrib/admin/views/main.py
webjunkie/django
5dbca13f3baa2e1bafd77e84a80ad6d8a074712e
[ "BSD-3-Clause" ]
null
null
null
django/contrib/admin/views/main.py
webjunkie/django
5dbca13f3baa2e1bafd77e84a80ad6d8a074712e
[ "BSD-3-Clause" ]
null
null
null
import sys import warnings from django.core.exceptions import SuspiciousOperation, ImproperlyConfigured from django.core.paginator import InvalidPage from django.core.urlresolvers import reverse from django.db import models from django.db.models.fields import FieldDoesNotExist from django.utils import six from django....
40.941589
99
0.61405
import sys import warnings from django.core.exceptions import SuspiciousOperation, ImproperlyConfigured from django.core.paginator import InvalidPage from django.core.urlresolvers import reverse from django.db import models from django.db.models.fields import FieldDoesNotExist from django.utils import six from django....
true
true
f76604037d29d0090e5e22887b8ed303b00fef4a
513
py
Python
test/lint/rules/last_stage/rule0_2_test.py
fi-ts/docker-make
e434ff783bd07cf2377bba36bf29528182af883d
[ "MIT" ]
2
2020-04-28T08:12:56.000Z
2021-06-19T00:59:16.000Z
test/lint/rules/last_stage/rule0_2_test.py
fi-ts/docker-make
e434ff783bd07cf2377bba36bf29528182af883d
[ "MIT" ]
5
2020-07-30T07:06:57.000Z
2021-04-20T09:44:23.000Z
test/lint/rules/last_stage/rule0_2_test.py
fi-ts/docker-make
e434ff783bd07cf2377bba36bf29528182af883d
[ "MIT" ]
2
2020-08-18T08:39:01.000Z
2021-04-20T13:24:18.000Z
import unittest from test.helpers import get_last_stage_wrapper class Rule02Test(unittest.TestCase): def test_rule0_2(self): context = """ FROM registry.a.com/acme/centos:7 LABEL maintainer="foo <foo@bar.com>" EXPOSE 7000 EXPOSE 8080 """ wrapper = get_last_...
25.65
92
0.647173
import unittest from test.helpers import get_last_stage_wrapper class Rule02Test(unittest.TestCase): def test_rule0_2(self): context = """ FROM registry.a.com/acme/centos:7 LABEL maintainer="foo <foo@bar.com>" EXPOSE 7000 EXPOSE 8080 """ wrapper = get_last_...
true
true
f76604ecfcfcc034631ed9bab386a5e0244a3bbe
11,334
py
Python
tests/st/networks/models/bert/src/utils.py
Vincent34/mindspore
a39a60878a46e7e9cb02db788c0bca478f2fa6e5
[ "Apache-2.0" ]
2
2021-07-08T13:10:42.000Z
2021-11-08T02:48:57.000Z
tests/st/networks/models/bert/src/utils.py
peixinhou/mindspore
fcb2ec2779b753e95c762cf292b23bd81d1f561b
[ "Apache-2.0" ]
null
null
null
tests/st/networks/models/bert/src/utils.py
peixinhou/mindspore
fcb2ec2779b753e95c762cf292b23bd81d1f561b
[ "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...
43.259542
117
0.648579
import mindspore.nn as nn from mindspore.common.initializer import TruncatedNormal from mindspore.ops import operations as P from mindspore.ops import functional as F from mindspore.ops import composite as C from mindspore.common.tensor import Tensor from mindspore.common.parameter import Parameter, ParameterTuple fr...
true
true
f76605f51fbae6ba9f9c4784486d333023f4e4a1
2,314
py
Python
propertyreader.py
vijay8451/quicksystem
515823ff88991daab1ec36958b252ce448c1ec76
[ "MIT" ]
3
2019-06-25T09:04:19.000Z
2019-10-01T13:02:29.000Z
propertyreader.py
vijay8451/quicksystem
515823ff88991daab1ec36958b252ce448c1ec76
[ "MIT" ]
2
2021-03-31T19:00:02.000Z
2021-12-13T19:58:31.000Z
propertyreader.py
vijay8451/quicksystem
515823ff88991daab1ec36958b252ce448c1ec76
[ "MIT" ]
null
null
null
import configparser config = configparser.ConfigParser() config.read('quicksystem.properties') class Properties(object): """quicksystem properties reader """ def __init__(self): self.randomSystem = RandomSystem() self.beaker = Beaker() self.jenkinsInstaller = JenkinsInstaller() ...
32.138889
94
0.651685
import configparser config = configparser.ConfigParser() config.read('quicksystem.properties') class Properties(object): def __init__(self): self.randomSystem = RandomSystem() self.beaker = Beaker() self.jenkinsInstaller = JenkinsInstaller() self.theSystem = TheSystem() s...
true
true
f766062a52cf64ebd2c92652266e804c961d44b2
5,062
py
Python
saleor/dashboard/order/utils.py
adonig/saleor
41f2148da45acd8309faeda5331ca5fc93a0d201
[ "BSD-3-Clause" ]
3
2019-04-17T01:00:47.000Z
2019-05-09T01:45:50.000Z
saleor/dashboard/order/utils.py
adonig/saleor
41f2148da45acd8309faeda5331ca5fc93a0d201
[ "BSD-3-Clause" ]
64
2019-02-11T17:02:05.000Z
2021-06-25T15:16:57.000Z
saleor/dashboard/order/utils.py
adonig/saleor
41f2148da45acd8309faeda5331ca5fc93a0d201
[ "BSD-3-Clause" ]
2
2019-01-08T02:32:42.000Z
2021-07-05T14:05:55.000Z
from django.conf import settings from django.contrib.sites.shortcuts import get_current_site from django.template.loader import get_template from ...checkout import AddressType from ...checkout.utils import _get_products_voucher_discount from ...core.utils.taxes import ZERO_MONEY from ...discount import VoucherType fr...
35.900709
79
0.723627
from django.conf import settings from django.contrib.sites.shortcuts import get_current_site from django.template.loader import get_template from ...checkout import AddressType from ...checkout.utils import _get_products_voucher_discount from ...core.utils.taxes import ZERO_MONEY from ...discount import VoucherType fr...
true
true
f76607859a4c31ac153e88bae2c2d944b47c29fa
25,905
py
Python
sdk/python/pulumiverse_unifi/port_forward.py
pulumiverse/pulumi-unifi
e22e1bef9b409c71ad578b5d9e39284a26da355c
[ "ECL-2.0", "Apache-2.0" ]
1
2022-03-29T18:49:28.000Z
2022-03-29T18:49:28.000Z
sdk/python/pulumiverse_unifi/port_forward.py
pulumiverse/pulumi-unifi
e22e1bef9b409c71ad578b5d9e39284a26da355c
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
sdk/python/pulumiverse_unifi/port_forward.py
pulumiverse/pulumi-unifi
e22e1bef9b409c71ad578b5d9e39284a26da355c
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
# 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 ...
44.510309
248
0.634588
import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from . import _utilities __all__ = ['PortForwardArgs', 'PortForward'] @pulumi.input_type class PortForwardArgs: def __init__(__self__, *, dst_port: Optional[pulumi.Input[str]]...
true
true
f76607b44b169c1417f177048eefac9f3cbfddd3
19,077
py
Python
source/brailleTables.py
seananocoistin/nvda
7ce7c050a75e35e63a936b23eff802f8f90ce469
[ "bzip2-1.0.6" ]
null
null
null
source/brailleTables.py
seananocoistin/nvda
7ce7c050a75e35e63a936b23eff802f8f90ce469
[ "bzip2-1.0.6" ]
null
null
null
source/brailleTables.py
seananocoistin/nvda
7ce7c050a75e35e63a936b23eff802f8f90ce469
[ "bzip2-1.0.6" ]
null
null
null
# A part of NonVisual Desktop Access (NVDA) # This file is covered by the GNU General Public License. # See the file COPYING for more details. # Copyright (C) 2008-2019 NV Access Limited, Joseph Lee, Babbage B.V. """Manages information about available braille translation tables. """ import collections #: T...
46.191283
116
0.722493
import collections TABLES_DIR = r"louis\tables" BrailleTable = collections.namedtuple("BrailleTable", ("fileName", "displayName", "contracted", "output", "input")) _tables = {} def addTable(fileName, displayName, contracted=False, output=True, input=True): if not output and not input: raise ValueEr...
true
true
f76608e1ec16f176d738ef116ffe7d35ee0c9a54
917
py
Python
tests/unitary/LiquidityGaugeV3_1/test_kick.py
caterpillar1219/hundred-dao
de95e4ade1b50ec64b59e44a53a324a12c4e29df
[ "MIT" ]
null
null
null
tests/unitary/LiquidityGaugeV3_1/test_kick.py
caterpillar1219/hundred-dao
de95e4ade1b50ec64b59e44a53a324a12c4e29df
[ "MIT" ]
null
null
null
tests/unitary/LiquidityGaugeV3_1/test_kick.py
caterpillar1219/hundred-dao
de95e4ade1b50ec64b59e44a53a324a12c4e29df
[ "MIT" ]
null
null
null
import brownie MAX_UINT256 = 2 ** 256 - 1 WEEK = 7 * 86400 def test_kick(chain, accounts, gauge_v3_1, voting_escrow, token, mock_lp_token): alice, bob = accounts[:2] chain.sleep(2 * WEEK + 5) token.mint(alice, 10 ** 24) token.approve(voting_escrow, MAX_UINT256, {"from": alice}) voting_escrow.cre...
28.65625
81
0.652126
import brownie MAX_UINT256 = 2 ** 256 - 1 WEEK = 7 * 86400 def test_kick(chain, accounts, gauge_v3_1, voting_escrow, token, mock_lp_token): alice, bob = accounts[:2] chain.sleep(2 * WEEK + 5) token.mint(alice, 10 ** 24) token.approve(voting_escrow, MAX_UINT256, {"from": alice}) voting_escrow.cre...
true
true
f76608f201f77eb5980c64990e7bc4f85af4f48b
29,189
py
Python
Strategy_6x6.py
pkosukhin/codehockey
1a0fd82ecd8d2fdf57ae9ff912d528ad69597b93
[ "MIT" ]
null
null
null
Strategy_6x6.py
pkosukhin/codehockey
1a0fd82ecd8d2fdf57ae9ff912d528ad69597b93
[ "MIT" ]
null
null
null
Strategy_6x6.py
pkosukhin/codehockey
1a0fd82ecd8d2fdf57ae9ff912d528ad69597b93
[ "MIT" ]
null
null
null
from model.ActionType import ActionType from model.HockeyistType import HockeyistType from model.Hockeyist import Hockeyist from Constants import * from PuckManPlay import * from DefPlay import * from MathFunc import * from PlayerStates import * from Strategy import * def strategy_6x6(const, players): for player ...
68.358314
154
0.482031
from model.ActionType import ActionType from model.HockeyistType import HockeyistType from model.Hockeyist import Hockeyist from Constants import * from PuckManPlay import * from DefPlay import * from MathFunc import * from PlayerStates import * from Strategy import * def strategy_6x6(const, players): for player ...
true
true
f7660a750097fb8216b357a84f320185e4b666d3
1,638
py
Python
bot/migrations/0025_auto_20180705_1839.py
dziban303/SpaceLaunchNow-Server
212565e97983bdf7159e9de06999fddc46967dbd
[ "Apache-2.0" ]
null
null
null
bot/migrations/0025_auto_20180705_1839.py
dziban303/SpaceLaunchNow-Server
212565e97983bdf7159e9de06999fddc46967dbd
[ "Apache-2.0" ]
null
null
null
bot/migrations/0025_auto_20180705_1839.py
dziban303/SpaceLaunchNow-Server
212565e97983bdf7159e9de06999fddc46967dbd
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.11.4 on 2018-07-05 18:39 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('bot', '0024_auto_20180705_1804'), ] operations = [...
34.851064
143
0.608059
from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('bot', '0024_auto_20180705_1804'), ] operations = [ migrations.RemoveField( model_name='location', ...
true
true
f7660aa7fd34f72628647fb9043ca6d28d59c9f9
2,410
py
Python
debug/main.py
frandorr/PROBA-V
89c1aa4dfc58d66e7747293f6738fdd4e2ba6e6f
[ "Apache-2.0" ]
14
2020-03-06T14:19:06.000Z
2022-01-31T05:19:02.000Z
debug/main.py
frandorr/PROBA-V
89c1aa4dfc58d66e7747293f6738fdd4e2ba6e6f
[ "Apache-2.0" ]
1
2021-01-18T09:13:19.000Z
2022-03-16T07:00:53.000Z
debug/main.py
frandorr/PROBA-V
89c1aa4dfc58d66e7747293f6738fdd4e2ba6e6f
[ "Apache-2.0" ]
7
2020-04-05T17:38:10.000Z
2021-09-22T13:33:41.000Z
from trainClass import * from utils.loss import * from utils.utils import * from modelsTF import * from tensorflow.keras.optimizers import Adam, SGD, Nadam from sklearn.model_selection import train_test_split from tensorflow.keras.metrics import Mean import tensorflow as tf import numpy as np import logging import os i...
40.166667
98
0.656017
from trainClass import * from utils.loss import * from utils.utils import * from modelsTF import * from tensorflow.keras.optimizers import Adam, SGD, Nadam from sklearn.model_selection import train_test_split from tensorflow.keras.metrics import Mean import tensorflow as tf import numpy as np import logging import os i...
true
true
f7660acd6dcfb313324349c04b7c2268f1d77ae6
47,827
py
Python
pytests/failover/failovertests.py
cgghali/TAF
1de8dec77ad781c373e18d9c285befd534ac203a
[ "Apache-2.0" ]
null
null
null
pytests/failover/failovertests.py
cgghali/TAF
1de8dec77ad781c373e18d9c285befd534ac203a
[ "Apache-2.0" ]
null
null
null
pytests/failover/failovertests.py
cgghali/TAF
1de8dec77ad781c373e18d9c285befd534ac203a
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- import copy import json from cb_tools.cbstats import Cbstats from couchbase_helper.documentgenerator import doc_generator from failover.failoverbasetest import FailoverBaseTest from membase.api.rest_client import RestConnection, RestHelper from remote.remote_util import RemoteUtilHelper, Remote...
47.874875
142
0.587242
import copy import json from cb_tools.cbstats import Cbstats from couchbase_helper.documentgenerator import doc_generator from failover.failoverbasetest import FailoverBaseTest from membase.api.rest_client import RestConnection, RestHelper from remote.remote_util import RemoteUtilHelper, RemoteMachineShellConnection f...
true
true
f7660b63ae4b4bf70baaf90c26ab90dff9955375
165
py
Python
app/api_v1/__init__.py
smolveau/TodoMessengerBot
a645152f00748d7c96cbef69ea593a7023b53dc7
[ "MIT" ]
null
null
null
app/api_v1/__init__.py
smolveau/TodoMessengerBot
a645152f00748d7c96cbef69ea593a7023b53dc7
[ "MIT" ]
null
null
null
app/api_v1/__init__.py
smolveau/TodoMessengerBot
a645152f00748d7c96cbef69ea593a7023b53dc7
[ "MIT" ]
1
2018-08-03T15:27:07.000Z
2018-08-03T15:27:07.000Z
from flask import Blueprint api = Blueprint('api_v1', __name__) # Import any endpoints here to make them available from . import webhook from . import webhook_dev
20.625
50
0.781818
from flask import Blueprint api = Blueprint('api_v1', __name__) from . import webhook from . import webhook_dev
true
true
f7660ba809c5ead2d1728facbcf182b0e5722075
3,064
py
Python
featuretools/tests/primitive_tests/test_distancetoholiday_primitive.py
Featuretools/featuretools
365abd9519d2eec8eec75936644a7b865d4ef40a
[ "BSD-3-Clause" ]
4,299
2017-09-09T02:41:29.000Z
2019-10-10T05:41:11.000Z
featuretools/tests/primitive_tests/test_distancetoholiday_primitive.py
Featuretools/featuretools
365abd9519d2eec8eec75936644a7b865d4ef40a
[ "BSD-3-Clause" ]
729
2017-09-22T01:54:48.000Z
2019-10-09T15:36:17.000Z
featuretools/tests/primitive_tests/test_distancetoholiday_primitive.py
Featuretools/featuretools
365abd9519d2eec8eec75936644a7b865d4ef40a
[ "BSD-3-Clause" ]
532
2017-09-13T14:18:22.000Z
2019-10-08T06:13:46.000Z
from datetime import datetime import numpy as np import pandas as pd import pytest from featuretools.primitives.standard.datetime_transform_primitives import ( DistanceToHoliday, ) def test_distanceholiday(): distance_to_holiday = DistanceToHoliday("New Year's Day") dates = pd.Series( [ ...
28.90566
85
0.609661
from datetime import datetime import numpy as np import pandas as pd import pytest from featuretools.primitives.standard.datetime_transform_primitives import ( DistanceToHoliday, ) def test_distanceholiday(): distance_to_holiday = DistanceToHoliday("New Year's Day") dates = pd.Series( [ ...
true
true
f7660c29ee7fc0ea9d0f37fc1af8b83686b9fc39
19,988
py
Python
nilmtk/disaggregate/hart_85.py
Agirljustsayhello/nilmtk
bf985f0f637460bd8df3bb1cbf17b81a20303826
[ "Apache-2.0" ]
1
2021-11-04T05:10:58.000Z
2021-11-04T05:10:58.000Z
nilmtk/disaggregate/hart_85.py
Agirljustsayhello/nilmtk
bf985f0f637460bd8df3bb1cbf17b81a20303826
[ "Apache-2.0" ]
null
null
null
nilmtk/disaggregate/hart_85.py
Agirljustsayhello/nilmtk
bf985f0f637460bd8df3bb1cbf17b81a20303826
[ "Apache-2.0" ]
1
2019-10-12T16:02:05.000Z
2019-10-12T16:02:05.000Z
from __future__ import print_function, division from collections import OrderedDict, deque from datetime import datetime from warnings import warn import pandas as pd from nilmtk.feature_detectors.cluster import hart85_means_shift_cluster from nilmtk.feature_detectors.steady_states import ( find_steady_states_tra...
42.618337
119
0.547278
from __future__ import print_function, division from collections import OrderedDict, deque from datetime import datetime from warnings import warn import pandas as pd from nilmtk.feature_detectors.cluster import hart85_means_shift_cluster from nilmtk.feature_detectors.steady_states import ( find_steady_states_tra...
true
true
f7660dbdc503861a66754bdc83bbbe1088670c6d
66
py
Python
__init__.py
justinnhli/send_gmail
04f9f5cd0270c2f2b873e890ea5e40cc76605e7f
[ "Apache-2.0" ]
null
null
null
__init__.py
justinnhli/send_gmail
04f9f5cd0270c2f2b873e890ea5e40cc76605e7f
[ "Apache-2.0" ]
null
null
null
__init__.py
justinnhli/send_gmail
04f9f5cd0270c2f2b873e890ea5e40cc76605e7f
[ "Apache-2.0" ]
null
null
null
from .send_gmail import jinja_render, markdown_render, send_email
33
65
0.863636
from .send_gmail import jinja_render, markdown_render, send_email
true
true
f7660de5ce6c4bd1877873fb2610eaefd6300157
106
py
Python
python-code/python-hello-world/for_loop_examples.py
Mlmaha/java-to-python-in-100-steps
c9dcce00b450a774e6dd85815bb71a55c298bf21
[ "MIT" ]
58
2018-06-28T17:17:44.000Z
2022-01-04T18:10:53.000Z
python-code/python-hello-world/for_loop_examples.py
Mlmaha/java-to-python-in-100-steps
c9dcce00b450a774e6dd85815bb71a55c298bf21
[ "MIT" ]
null
null
null
python-code/python-hello-world/for_loop_examples.py
Mlmaha/java-to-python-in-100-steps
c9dcce00b450a774e6dd85815bb71a55c298bf21
[ "MIT" ]
59
2018-07-01T13:59:34.000Z
2022-03-17T07:48:26.000Z
for i in range(1,10): print(i) print("Done") for i in range(1,10): print(i*i) print("Test")
11.777778
21
0.556604
for i in range(1,10): print(i) print("Done") for i in range(1,10): print(i*i) print("Test")
true
true
f7661026762f2a581e02b696731e11ec769a652f
3,075
py
Python
pyingest/tests/test_parsers_arxiv.py
csgrant00/adsabs-pyingest
6fc406f5aba198bffa924d9d994fdb241e733cd0
[ "MIT" ]
1
2020-06-04T20:09:03.000Z
2020-06-04T20:09:03.000Z
pyingest/tests/test_parsers_arxiv.py
csgrant00/adsabs-pyingest
6fc406f5aba198bffa924d9d994fdb241e733cd0
[ "MIT" ]
null
null
null
pyingest/tests/test_parsers_arxiv.py
csgrant00/adsabs-pyingest
6fc406f5aba198bffa924d9d994fdb241e733cd0
[ "MIT" ]
null
null
null
""" Test parsers """ from __future__ import print_function import unittest import filecmp import sys import os import glob import json import shutil from mock import patch, Mock, mock_open from pyingest.parsers import arxiv from pyingest.config import config from pyingest.parsers.author_names import AuthorNames from ...
37.962963
167
0.655285
from __future__ import print_function import unittest import filecmp import sys import os import glob import json import shutil from mock import patch, Mock, mock_open from pyingest.parsers import arxiv from pyingest.config import config from pyingest.parsers.author_names import AuthorNames from pyingest.parsers.affi...
true
true
f7661031813634c369700eb8e83ab36e9a8b1357
2,497
py
Python
aiortc/codecs/opus.py
sfrost23/aiortc
ca23567ca74cd45ad1d507a9fe8c4a5e61ca6ae8
[ "BSD-3-Clause" ]
4
2019-09-02T22:26:03.000Z
2020-09-02T18:13:29.000Z
aiortc/codecs/opus.py
sfrost23/aiortc
ca23567ca74cd45ad1d507a9fe8c4a5e61ca6ae8
[ "BSD-3-Clause" ]
2
2018-12-24T19:18:58.000Z
2018-12-24T20:09:32.000Z
aiortc/codecs/opus.py
koenvo/aiortc
ac834849b58f852722079436e616562b7d9f787b
[ "BSD-3-Clause" ]
2
2021-03-04T04:05:54.000Z
2021-03-25T07:33:43.000Z
import audioop import fractions from av import AudioFrame from ._opus import ffi, lib CHANNELS = 2 SAMPLE_RATE = 48000 SAMPLE_WIDTH = 2 SAMPLES_PER_FRAME = 960 TIME_BASE = fractions.Fraction(1, SAMPLE_RATE) class OpusDecoder: def __init__(self): error = ffi.new('int *') self.decoder = lib.opus_...
31.607595
93
0.612335
import audioop import fractions from av import AudioFrame from ._opus import ffi, lib CHANNELS = 2 SAMPLE_RATE = 48000 SAMPLE_WIDTH = 2 SAMPLES_PER_FRAME = 960 TIME_BASE = fractions.Fraction(1, SAMPLE_RATE) class OpusDecoder: def __init__(self): error = ffi.new('int *') self.decoder = lib.opus_...
true
true
f766104d505d9a57a52f66b38b49e34135a1a40f
1,050
py
Python
app.py
grosskur/tornado-sample
e28346e07a6f9cf4c8f32c7f87b4d68bb1c2e21c
[ "Unlicense" ]
null
null
null
app.py
grosskur/tornado-sample
e28346e07a6f9cf4c8f32c7f87b4d68bb1c2e21c
[ "Unlicense" ]
null
null
null
app.py
grosskur/tornado-sample
e28346e07a6f9cf4c8f32c7f87b4d68bb1c2e21c
[ "Unlicense" ]
null
null
null
""" Example application using Tornado and Curl """ import os import sys import tornado.httpclient import tornado.ioloop import tornado.web tornado.httpclient.AsyncHTTPClient.configure( 'tornado.curl_httpclient.CurlAsyncHTTPClient') class MainHandler(tornado.web.RequestHandler): @tornado.web.asynchronous ...
23.333333
67
0.66
import os import sys import tornado.httpclient import tornado.ioloop import tornado.web tornado.httpclient.AsyncHTTPClient.configure( 'tornado.curl_httpclient.CurlAsyncHTTPClient') class MainHandler(tornado.web.RequestHandler): @tornado.web.asynchronous def get(self): client = tornado.httpclien...
true
true
f766105acf4b3d769a87da6a8c740a4c32f1e322
958
py
Python
python/client/client.py
PetarZecevic/smart-farm
d118e30cfdaacf75969013c25cd732e31a9345f0
[ "Apache-2.0" ]
null
null
null
python/client/client.py
PetarZecevic/smart-farm
d118e30cfdaacf75969013c25cd732e31a9345f0
[ "Apache-2.0" ]
null
null
null
python/client/client.py
PetarZecevic/smart-farm
d118e30cfdaacf75969013c25cd732e31a9345f0
[ "Apache-2.0" ]
null
null
null
# Client application import paho.mqtt.client as mqtt import os import time # MQTT Broker info broker = "m16.cloudmqtt.com" port = 15432 ssl_port = 25432 username = "idimoiey" password = "DtiBxZxDcQsI" def on_message(client, userdata, message): message_content = message.payload.decode('utf-8') if message.topic == '...
23.365854
50
0.736952
import paho.mqtt.client as mqtt import os import time broker = "m16.cloudmqtt.com" port = 15432 ssl_port = 25432 username = "idimoiey" password = "DtiBxZxDcQsI" def on_message(client, userdata, message): message_content = message.payload.decode('utf-8') if message.topic == 'farm/water_system': if message_content...
true
true
f76610e6a6773d714737c759d4be0efc0944cc53
22,296
py
Python
bot/bot.py
mail-ru-im/python-icq-bot
3b57eb7f724feb9ce41de5263601a6ed1ab1e30a
[ "MIT" ]
54
2019-08-07T15:02:10.000Z
2022-02-19T18:54:26.000Z
bot/bot.py
mail-ru-im/python-icq-bot
3b57eb7f724feb9ce41de5263601a6ed1ab1e30a
[ "MIT" ]
18
2019-08-12T00:46:09.000Z
2022-02-10T11:37:31.000Z
bot/bot.py
mail-ru-im/python-icq-bot
3b57eb7f724feb9ce41de5263601a6ed1ab1e30a
[ "MIT" ]
24
2020-04-08T05:46:37.000Z
2022-03-25T19:08:43.000Z
import cgi import logging import sys import re from signal import signal, SIGINT, SIGTERM, SIGABRT from threading import Thread, Lock from time import sleep import types import json import requests from cached_property import cached_property from expiringdict import ExpiringDict from requests import Request from reque...
34.728972
116
0.583737
import cgi import logging import sys import re from signal import signal, SIGINT, SIGTERM, SIGABRT from threading import Thread, Lock from time import sleep import types import json import requests from cached_property import cached_property from expiringdict import ExpiringDict from requests import Request from reque...
true
true
f76611355d1945e23d9bee6d5ffe531cbd4a9a9a
675
py
Python
setup.py
deltasherlock/utility-package
584f3108ce11ae5d8eadcb1a8af47f729f76d1ec
[ "MIT" ]
null
null
null
setup.py
deltasherlock/utility-package
584f3108ce11ae5d8eadcb1a8af47f729f76d1ec
[ "MIT" ]
null
null
null
setup.py
deltasherlock/utility-package
584f3108ce11ae5d8eadcb1a8af47f729f76d1ec
[ "MIT" ]
null
null
null
from setuptools import setup, find_packages setup ( name= 'deltasherlock', version= '0.1.1', description= 'Application Identification', author='BU PEACLab', classifiers = [ 'Development Status :: 3 - Alpha', 'Programming Language :: Python :: 3' ], packages= find_packages(), include_package_data = True, # pa...
22.5
188
0.725926
from setuptools import setup, find_packages setup ( name= 'deltasherlock', version= '0.1.1', description= 'Application Identification', author='BU PEACLab', classifiers = [ 'Development Status :: 3 - Alpha', 'Programming Language :: Python :: 3' ], packages= find_packages(), include_package_data = True, ...
true
true
f766113947da30e6e0f4336ec84dad8db721efda
1,521
py
Python
library/goldsrc/mdl_v4/structs/model.py
anderlli0053/SourceIO
3c0c4839939ce698439987ac52154f89ee2f5341
[ "MIT" ]
199
2019-04-02T02:30:58.000Z
2022-03-30T21:29:49.000Z
library/goldsrc/mdl_v4/structs/model.py
anderlli0053/SourceIO
3c0c4839939ce698439987ac52154f89ee2f5341
[ "MIT" ]
113
2019-03-03T19:36:25.000Z
2022-03-31T19:44:05.000Z
library/goldsrc/mdl_v4/structs/model.py
anderlli0053/SourceIO
3c0c4839939ce698439987ac52154f89ee2f5341
[ "MIT" ]
38
2019-05-15T16:49:30.000Z
2022-03-22T03:40:43.000Z
from typing import List import numpy as np from .mesh import StudioMesh from .....library.utils.byte_io_mdl import ByteIO class StudioModel: vertex_dtype = np.dtype([ ('id', np.uint32, (1,)), ('pos', np.float32, (3,)), ]) def __init__(self): self.name = '' self.unk_1 = 0...
25.779661
94
0.595661
from typing import List import numpy as np from .mesh import StudioMesh from .....library.utils.byte_io_mdl import ByteIO class StudioModel: vertex_dtype = np.dtype([ ('id', np.uint32, (1,)), ('pos', np.float32, (3,)), ]) def __init__(self): self.name = '' self.unk_1 = 0...
true
true
f76613810efdd46752dbcdc0f1164b566e84a9fd
2,756
py
Python
myAlbum/tests.py
Vitalis-Kirui/My-Album
b2a10fbd50e9efafc9e360db7da1495f405f4516
[ "MIT" ]
null
null
null
myAlbum/tests.py
Vitalis-Kirui/My-Album
b2a10fbd50e9efafc9e360db7da1495f405f4516
[ "MIT" ]
null
null
null
myAlbum/tests.py
Vitalis-Kirui/My-Album
b2a10fbd50e9efafc9e360db7da1495f405f4516
[ "MIT" ]
null
null
null
from django.test import TestCase from .models import Category, Location, Image class CategoryTestClass(TestCase): def setUp(self): self.category = Category(category_name='Wildlife') self.category.save_category() def test_instance(self): self.assertTrue(isinstance(self.category, Categor...
32.423529
146
0.663643
from django.test import TestCase from .models import Category, Location, Image class CategoryTestClass(TestCase): def setUp(self): self.category = Category(category_name='Wildlife') self.category.save_category() def test_instance(self): self.assertTrue(isinstance(self.category, Categor...
true
true
f76614f3c7f27140272918f8ecde5ac8b1e84b5d
10,035
py
Python
connections.py
labscript-suite-temp-2-archive/mearnshaw-blacs--forked-from--labscript_suite-blacs
e2664d6d7ad1382692cc248f61ffbee5410b86f3
[ "BSD-2-Clause" ]
null
null
null
connections.py
labscript-suite-temp-2-archive/mearnshaw-blacs--forked-from--labscript_suite-blacs
e2664d6d7ad1382692cc248f61ffbee5410b86f3
[ "BSD-2-Clause" ]
null
null
null
connections.py
labscript-suite-temp-2-archive/mearnshaw-blacs--forked-from--labscript_suite-blacs
e2664d6d7ad1382692cc248f61ffbee5410b86f3
[ "BSD-2-Clause" ]
null
null
null
##################################################################### # # # /connections.py # # # # Copyright 2013, Monash University ...
44.013158
136
0.54559
import labscript_utils.h5_lock, h5py import logging import labscript_utils.excepthook import numpy as np class ConnectionTable(object): def __init__(self, h5file): self.logger = logging.getLogger('BLACS.ConnectionTable') self.toplevel_children = {} self.logger.debug('Parsing connectio...
false
true
f76615ba5ea8114943d41c6ad732c745ac5c05fd
26,718
py
Python
Janaagraha Bot/venv/Lib/site-packages/gcloud/bigtable/row_filters.py
CFGIndia20/team-19
e2b27ad8009303d262c2dc60551d6fcc4645b3b5
[ "MIT" ]
5
2018-01-18T11:39:23.000Z
2022-01-01T11:38:40.000Z
Janaagraha Bot/venv/Lib/site-packages/gcloud/bigtable/row_filters.py
CFGIndia20/team-19
e2b27ad8009303d262c2dc60551d6fcc4645b3b5
[ "MIT" ]
12
2021-04-11T19:46:06.000Z
2021-06-18T16:08:37.000Z
Janaagraha Bot/venv/Lib/site-packages/gcloud/bigtable/row_filters.py
CFGIndia20/team-19
e2b27ad8009303d262c2dc60551d6fcc4645b3b5
[ "MIT" ]
4
2018-01-18T11:32:38.000Z
2021-11-25T23:28:04.000Z
# Copyright 2016 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 a...
34.743823
79
0.640841
from gcloud._helpers import _microseconds_from_datetime from gcloud._helpers import _to_bytes from gcloud.bigtable._generated_v2 import ( data_pb2 as data_v2_pb2) class RowFilter(object): def __ne__(self, other): return not self.__eq__(other) class _BoolFilter(RowFilter): def __init__(self,...
true
true
f76615c7153ba6ce08499cc84c154d665ad5a6a9
1,403
py
Python
setup.py
lolnate/pycuckoo
74915bbf18e4b8256a9489c6657702f029fd0e6e
[ "Apache-2.0" ]
null
null
null
setup.py
lolnate/pycuckoo
74915bbf18e4b8256a9489c6657702f029fd0e6e
[ "Apache-2.0" ]
null
null
null
setup.py
lolnate/pycuckoo
74915bbf18e4b8256a9489c6657702f029fd0e6e
[ "Apache-2.0" ]
1
2018-11-30T20:01:30.000Z
2018-11-30T20:01:30.000Z
#!/usr/bin/env python import sys from setuptools import setup, find_packages from codecs import open from os import path here = path.abspath(path.dirname(__file__)) with open(path.join(here, 'README.md'), encoding='utf-8') as f: long_description = f.read() description = "Python library for using the Cuckoo 2.0 ...
30.5
75
0.675695
import sys from setuptools import setup, find_packages from codecs import open from os import path here = path.abspath(path.dirname(__file__)) with open(path.join(here, 'README.md'), encoding='utf-8') as f: long_description = f.read() description = "Python library for using the Cuckoo 2.0 API".encode('utf-8') ...
true
true
f766163518cb9e1581e9b7459efcbd801ec33bdd
1,405
py
Python
setup.py
fitoria/django-dilla
5ad4ab3b9cd12361484367f35ee9c275d209663d
[ "BSD-3-Clause" ]
1
2015-11-05T13:42:48.000Z
2015-11-05T13:42:48.000Z
setup.py
fitoria/django-dilla
5ad4ab3b9cd12361484367f35ee9c275d209663d
[ "BSD-3-Clause" ]
null
null
null
setup.py
fitoria/django-dilla
5ad4ab3b9cd12361484367f35ee9c275d209663d
[ "BSD-3-Clause" ]
null
null
null
from setuptools import setup, find_packages from distribute_setup import use_setuptools use_setuptools() setup( name='django-dilla', version='0.2dev', author='Adam Rutkowski', author_email='adam@mtod.org', packages=find_packages(), url='http://aerosol.github.com/django-dilla/', license='BS...
37.972973
90
0.572954
from setuptools import setup, find_packages from distribute_setup import use_setuptools use_setuptools() setup( name='django-dilla', version='0.2dev', author='Adam Rutkowski', author_email='adam@mtod.org', packages=find_packages(), url='http://aerosol.github.com/django-dilla/', license='BS...
true
true
f766177d72ecedfdf5360083751f149a0718b752
111
py
Python
assignment6/mapper.py
IITDU-BSSE06/ads-demystifying-the-logs-snigdharubama-iitdu
cf91ecf4b5073aed69fd0d9ae5af71bbfd160f5c
[ "MIT" ]
null
null
null
assignment6/mapper.py
IITDU-BSSE06/ads-demystifying-the-logs-snigdharubama-iitdu
cf91ecf4b5073aed69fd0d9ae5af71bbfd160f5c
[ "MIT" ]
null
null
null
assignment6/mapper.py
IITDU-BSSE06/ads-demystifying-the-logs-snigdharubama-iitdu
cf91ecf4b5073aed69fd0d9ae5af71bbfd160f5c
[ "MIT" ]
null
null
null
#!/usr/bin/python import sys for line in sys.stdin: data = line.strip().split(" ") print(data[6])
13.875
35
0.594595
import sys for line in sys.stdin: data = line.strip().split(" ") print(data[6])
true
true
f76617f02cda43365ee18257148ea38cc8261ea9
2,680
py
Python
ci/order-crates-for-publishing.py
RupamHarod3941/solana
6e9992bfe492e9507fe4d5af3d29a6455d309fe2
[ "Apache-2.0" ]
null
null
null
ci/order-crates-for-publishing.py
RupamHarod3941/solana
6e9992bfe492e9507fe4d5af3d29a6455d309fe2
[ "Apache-2.0" ]
null
null
null
ci/order-crates-for-publishing.py
RupamHarod3941/solana
6e9992bfe492e9507fe4d5af3d29a6455d309fe2
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 # # This script figures the order in which workspace crates must be published to # crates.io. Along the way it also ensures there are no circular dependencies # that would cause a |cargo publish| to fail. # # On success an ordered list of Cargo.toml files is written to stdout # import os import...
35.263158
136
0.677239
import os import json import subprocess import sys; real_file = os.path.realpath(__file__) ci_path = os.path.dirname(real_file) src_root = os.path.dirname(ci_path) def load_metadata(): cmd = f'{src_root}/cargo metadata --no-deps --format-version=1' return json.loads(subprocess.Popen( cmd, shell=True,...
true
true
f766189d1ebbb2fb195e90582eae46137f6c51fd
1,437
py
Python
lib-python/2.7/ctypes/test/test_returnfuncptrs.py
clach04/bb_import_jython
4529a0f578186a1c33c476300294ab42658eaf7c
[ "CNRI-Jython" ]
70
2015-08-04T09:39:43.000Z
2021-09-04T23:28:39.000Z
lib-python/2.7/ctypes/test/test_returnfuncptrs.py
clach04/bb_import_jython
4529a0f578186a1c33c476300294ab42658eaf7c
[ "CNRI-Jython" ]
20
2015-04-20T12:09:12.000Z
2022-03-12T01:25:04.000Z
lib-python/2.7/ctypes/test/test_returnfuncptrs.py
clach04/bb_import_jython
4529a0f578186a1c33c476300294ab42658eaf7c
[ "CNRI-Jython" ]
299
2015-01-23T10:06:24.000Z
2022-02-02T06:34:51.000Z
import unittest from ctypes import * import _ctypes_test class ReturnFuncPtrTestCase(unittest.TestCase): def test_with_prototype(self): # The _ctypes_test shared lib/dll exports quite some functions for testing. # The get_strchr function returns a *pointer* to the C strchr function. dll =...
39.916667
91
0.671538
import unittest from ctypes import * import _ctypes_test class ReturnFuncPtrTestCase(unittest.TestCase): def test_with_prototype(self): dll = CDLL(_ctypes_test.__file__) get_strchr = dll.get_strchr get_strchr.restype = CFUNCTYPE(c_char_p, c_char_p, c_char) strchr =...
true
true
f766195225f6da9fbde1f83d5e050d628cd06b45
365
py
Python
lab4_funkcje/4.6.py
Damian9449/Python
dc9091e15356733821bbb6a768b7d5e428640340
[ "MIT" ]
1
2017-11-15T13:03:40.000Z
2017-11-15T13:03:40.000Z
lab4_funkcje/4.6.py
Damian9449/Python
dc9091e15356733821bbb6a768b7d5e428640340
[ "MIT" ]
null
null
null
lab4_funkcje/4.6.py
Damian9449/Python
dc9091e15356733821bbb6a768b7d5e428640340
[ "MIT" ]
null
null
null
#!/usr/bin/python L = [1, 2, [3, 4], (1, 2), [1, [2, 3, (2, 5)]], 8] def sum_seq(sequence): if len(sequence) == 0: return 0 else: if isinstance(sequence[0], (list, tuple)): return sum_seq(sequence[0]) + sum_seq(sequence[1:]) else: return sequence[0] + sum_seq(s...
21.470588
63
0.520548
L = [1, 2, [3, 4], (1, 2), [1, [2, 3, (2, 5)]], 8] def sum_seq(sequence): if len(sequence) == 0: return 0 else: if isinstance(sequence[0], (list, tuple)): return sum_seq(sequence[0]) + sum_seq(sequence[1:]) else: return sequence[0] + sum_seq(sequence[1:]) pri...
true
true
f76619bc3a6901884828c14047cd9255c468bb07
18,093
py
Python
AlleleHMM.py
Danko-Lab/AlleleHMM
03c3ac6d50d81cf9329fa1ac2bf0e7b89b39ba79
[ "BSD-2-Clause" ]
3
2018-08-11T16:48:09.000Z
2019-06-20T02:32:26.000Z
AlleleHMM.py
Danko-Lab/AlleleHMM
03c3ac6d50d81cf9329fa1ac2bf0e7b89b39ba79
[ "BSD-2-Clause" ]
null
null
null
AlleleHMM.py
Danko-Lab/AlleleHMM
03c3ac6d50d81cf9329fa1ac2bf0e7b89b39ba79
[ "BSD-2-Clause" ]
null
null
null
#python AlleleHMM.py prefix counts_plus_hmm.txt counts_minus_hmm.txt import numpy as np from math import * import scipy.stats #from sys import argv import matplotlib as mpl mpl.use('Agg') import matplotlib.pyplot as plt import time import multiprocessing import sys, getopt counts_hmm="-" counts_plus_hmm = "-" counts_...
37
247
0.590118
import numpy as np from math import * import scipy.stats import matplotlib as mpl mpl.use('Agg') import matplotlib.pyplot as plt import time import multiprocessing import sys, getopt counts_hmm="-" counts_plus_hmm = "-" counts_minus_hmm = "-" predict=False tao = "default" prefix="AlleleHMM_output" ITER=30 def help_m...
false
true
f76619d1b14fc5eb7503464a18c0aece909c3d09
1,030
py
Python
traitcuration/urls.py
joj0s/trait-curation
a61d1e7aebf3ab444373be03c100236d4c955e19
[ "Apache-2.0" ]
2
2020-05-12T16:51:43.000Z
2020-09-22T10:40:04.000Z
traitcuration/urls.py
joj0s/trait-curation
a61d1e7aebf3ab444373be03c100236d4c955e19
[ "Apache-2.0" ]
97
2020-05-12T09:17:44.000Z
2021-09-22T19:03:58.000Z
traitcuration/urls.py
joj0s/trait-curation
a61d1e7aebf3ab444373be03c100236d4c955e19
[ "Apache-2.0" ]
2
2020-05-28T10:34:39.000Z
2020-10-29T10:11:27.000Z
"""traitcuration URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/3.0/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, name='home') Class...
36.785714
77
0.704854
from django.contrib import admin from django.urls import path, include from django.views.generic.base import RedirectView urlpatterns = [ path('admin/', admin.site.urls), path('traits/', include('traitcuration.traits.urls')), path('api/v1/', include('traitcuration.api.urls')), path('accounts/', includ...
true
true
f7661a1502840d533ae820d3468a6d5abd122640
1,511
py
Python
controllers/register.py
MatthewKosloski/student-information-system
a3469647298d62c45c793e70a3ac70c0524340e2
[ "CECILL-B" ]
null
null
null
controllers/register.py
MatthewKosloski/student-information-system
a3469647298d62c45c793e70a3ac70c0524340e2
[ "CECILL-B" ]
null
null
null
controllers/register.py
MatthewKosloski/student-information-system
a3469647298d62c45c793e70a3ac70c0524340e2
[ "CECILL-B" ]
null
null
null
from .base import BaseController from views import RegisterView from models import Registration, Student from common_queries import get_section_name, get_username_and_full_name from peewee import IntegrityError from routes import * class RegisterController(BaseController): def __init__(self, router, payload): supe...
27.472727
75
0.750496
from .base import BaseController from views import RegisterView from models import Registration, Student from common_queries import get_section_name, get_username_and_full_name from peewee import IntegrityError from routes import * class RegisterController(BaseController): def __init__(self, router, payload): supe...
true
true
f7661a5b5660079562f07982a55ac84dc15b25ca
8,285
py
Python
src/sentry/eventstream/snuba.py
uandco/sentry
5b8d45cb71c6617dac8e64265848623fbfce9c99
[ "BSD-3-Clause" ]
2
2019-03-04T12:45:54.000Z
2019-03-04T12:45:55.000Z
src/sentry/eventstream/snuba.py
uandco/sentry
5b8d45cb71c6617dac8e64265848623fbfce9c99
[ "BSD-3-Clause" ]
196
2019-06-10T08:34:10.000Z
2022-02-22T01:26:13.000Z
src/sentry/eventstream/snuba.py
uandco/sentry
5b8d45cb71c6617dac8e64265848623fbfce9c99
[ "BSD-3-Clause" ]
null
null
null
from __future__ import absolute_import import logging from datetime import datetime from uuid import uuid4 import pytz import urllib3 from sentry import quotas from sentry.eventstream.base import EventStream from sentry.utils import snuba, json from sentry.utils.safe import get_path logger = logging.getLogger(__na...
30.459559
87
0.565963
from __future__ import absolute_import import logging from datetime import datetime from uuid import uuid4 import pytz import urllib3 from sentry import quotas from sentry.eventstream.base import EventStream from sentry.utils import snuba, json from sentry.utils.safe import get_path logger = logging.getLogger(__na...
true
true
f7661a6902ddd37c8532a6c2b7bf6f4ad03d91f9
1,529
py
Python
dvc/fs/webhdfs.py
tirkarthi/dvc
61699d1d669159a320f5bb3022cefebf8fe7b9f5
[ "Apache-2.0" ]
null
null
null
dvc/fs/webhdfs.py
tirkarthi/dvc
61699d1d669159a320f5bb3022cefebf8fe7b9f5
[ "Apache-2.0" ]
41
2021-11-16T15:38:50.000Z
2022-03-30T10:32:14.000Z
dvc/fs/webhdfs.py
jhhuh/dvc
fecc81e951efeaa8130264f726c27e92876422ae
[ "Apache-2.0" ]
null
null
null
import threading from funcy import cached_property, wrap_prop from dvc.scheme import Schemes # pylint:disable=abstract-method from .base import FileSystem class WebHDFSFileSystem(FileSystem): scheme = Schemes.WEBHDFS REQUIRES = {"fsspec": "fsspec"} PARAM_CHECKSUM = "checksum" @classmethod def ...
26.824561
77
0.64225
import threading from funcy import cached_property, wrap_prop from dvc.scheme import Schemes from .base import FileSystem class WebHDFSFileSystem(FileSystem): scheme = Schemes.WEBHDFS REQUIRES = {"fsspec": "fsspec"} PARAM_CHECKSUM = "checksum" @classmethod def _strip_protocol(cls, path: str) -...
true
true
f7661abd71f523b1889b6b3ed765d896bf21f9ab
1,427
py
Python
ooobuild/lo/form/control/navigation_tool_bar.py
Amourspirit/ooo_uno_tmpl
64e0c86fd68f24794acc22d63d8d32ae05dd12b8
[ "Apache-2.0" ]
null
null
null
ooobuild/lo/form/control/navigation_tool_bar.py
Amourspirit/ooo_uno_tmpl
64e0c86fd68f24794acc22d63d8d32ae05dd12b8
[ "Apache-2.0" ]
null
null
null
ooobuild/lo/form/control/navigation_tool_bar.py
Amourspirit/ooo_uno_tmpl
64e0c86fd68f24794acc22d63d8d32ae05dd12b8
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 # # Copyright 2022 :Barry-Thomas-Paul: Moss # # Licensed under the Apache License, Version 2.0 (the "License") # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http: // www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
35.675
174
0.758935
from ...awt.uno_control import UnoControl as UnoControl_8f2c0a67 class NavigationToolBar(UnoControl_8f2c0a67): __ooo_ns__: str = 'com.sun.star.form.control' __ooo_full_ns__: str = 'com.sun.star.form.control.NavigationToolBar' __ooo_type_name__: str = 'service' __all__ = ['NavigationToolBar']
true
true
f7661bad60badd2c013f9e36de36265fd6cd9edd
5,106
py
Python
flair/models/language_model.py
shuu-tatsu/subwordsLM
baae8657e3cd2957689b2365155156cd9d18cad8
[ "MIT" ]
null
null
null
flair/models/language_model.py
shuu-tatsu/subwordsLM
baae8657e3cd2957689b2365155156cd9d18cad8
[ "MIT" ]
1
2020-08-19T08:37:49.000Z
2020-08-19T08:37:49.000Z
flair/models/language_model.py
shuu-tatsu/subwordsLM
baae8657e3cd2957689b2365155156cd9d18cad8
[ "MIT" ]
1
2020-06-02T11:56:05.000Z
2020-06-02T11:56:05.000Z
import torch.nn as nn import torch import math from torch.autograd import Variable from typing import Dict, List from flair.data import Dictionary class LanguageModel(nn.Module): """Container module with an encoder, a recurrent module, and a decoder.""" def __init__(self, dictionary: Diction...
34.268456
92
0.582648
import torch.nn as nn import torch import math from torch.autograd import Variable from typing import Dict, List from flair.data import Dictionary class LanguageModel(nn.Module): def __init__(self, dictionary: Dictionary, is_forward_lm: bool, hidden_size: int, ...
true
true
f7661c18f8624311dc407556d1562dcf60a5c7e7
177
py
Python
esialogin/apps/esia/urls.py
noadavis/esialogin
6e7fa52cb51a50fd42f51df3cb3a6c5822b7a53a
[ "MIT" ]
null
null
null
esialogin/apps/esia/urls.py
noadavis/esialogin
6e7fa52cb51a50fd42f51df3cb3a6c5822b7a53a
[ "MIT" ]
null
null
null
esialogin/apps/esia/urls.py
noadavis/esialogin
6e7fa52cb51a50fd42f51df3cb3a6c5822b7a53a
[ "MIT" ]
null
null
null
from django.urls import path from . import views app_name = 'esia' urlpatterns = [ path('', views.index, name='index'), path('esia/', views.callback, name='callback') ]
22.125
50
0.666667
from django.urls import path from . import views app_name = 'esia' urlpatterns = [ path('', views.index, name='index'), path('esia/', views.callback, name='callback') ]
true
true
f7661c816911becc1ac588d2f521a97a16951ec6
12,640
py
Python
tests/test_model.py
nomad010/serde
560dd07ac4a5fa2bbed04df9d72defeda14ae4e5
[ "MIT" ]
null
null
null
tests/test_model.py
nomad010/serde
560dd07ac4a5fa2bbed04df9d72defeda14ae4e5
[ "MIT" ]
null
null
null
tests/test_model.py
nomad010/serde
560dd07ac4a5fa2bbed04df9d72defeda14ae4e5
[ "MIT" ]
null
null
null
import datetime import mock from pytest import raises from serde import Model, field from serde.error import DeserializationError, SerdeError, SerializationError, ValidationError from tests import py2_patch_str_with_basestring class TestModel: def test___new__(self): class Example(Model): a...
32.081218
100
0.570965
import datetime import mock from pytest import raises from serde import Model, field from serde.error import DeserializationError, SerdeError, SerializationError, ValidationError from tests import py2_patch_str_with_basestring class TestModel: def test___new__(self): class Example(Model): a...
true
true
f7661cf40bfe6304e41b4c3bc37be63dc47049d9
542
py
Python
Packages/Dead/demo/Script/tutorials/eztemplate_legend_vert_per_row.py
xylar/cdat
8a5080cb18febfde365efc96147e25f51494a2bf
[ "BSD-3-Clause" ]
62
2018-03-30T15:46:56.000Z
2021-12-08T23:30:24.000Z
Packages/Dead/demo/Script/tutorials/eztemplate_legend_vert_per_row.py
xylar/cdat
8a5080cb18febfde365efc96147e25f51494a2bf
[ "BSD-3-Clause" ]
114
2018-03-21T01:12:43.000Z
2021-07-05T12:29:54.000Z
Packages/Dead/demo/Script/tutorials/eztemplate_legend_vert_per_row.py
CDAT/uvcdat
5133560c0c049b5c93ee321ba0af494253b44f91
[ "BSD-3-Clause" ]
14
2018-06-06T02:42:47.000Z
2021-11-26T03:27:00.000Z
# Adapted for numpy/ma/cdms2 by convertcdms.py import os, sys import cdms2 as cdms, vcs import EzTemplate # Open file and retrieve data variable. fname = os.path.join(vcs.sample_data, 'clt.nc') cfile = cdms.open(fname) data = cfile('clt') # Initialize vcs. x = vcs.init() # Configure the template. M = EzTemplate.Mul...
20.074074
48
0.654982
import os, sys import cdms2 as cdms, vcs import EzTemplate fname = os.path.join(vcs.sample_data, 'clt.nc') cfile = cdms.open(fname) data = cfile('clt') x = vcs.init() M = EzTemplate.Multi(rows=4, columns=3) M.legend.direction = 'vertical' for i in range(12): t = M.get(legend='local') if i%3 != 2: ...
true
true
f7661d5b73f607a73dee48725359ff299e13805a
851
py
Python
qiskit/chemistry/results/__init__.py
dongreenberg/aqua
051635bb9beb64a9a6aa27a04264b548bf2e48a9
[ "Apache-2.0" ]
2
2020-04-09T17:27:41.000Z
2021-01-15T04:27:07.000Z
qiskit/chemistry/results/__init__.py
dongreenberg/aqua
051635bb9beb64a9a6aa27a04264b548bf2e48a9
[ "Apache-2.0" ]
2
2020-04-21T19:59:47.000Z
2020-04-26T21:36:47.000Z
qiskit/chemistry/results/__init__.py
dongreenberg/aqua
051635bb9beb64a9a6aa27a04264b548bf2e48a9
[ "Apache-2.0" ]
null
null
null
# This code is part of Qiskit. # # (C) Copyright IBM 2020. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any modifications or derivative wo...
34.04
79
0.752056
from .electronic_structure_result import DipoleTuple, ElectronicStructureResult from .vibronic_structure_result import VibronicStructureResult from .eigenstate_result import EigenstateResult __all__ = ['DipoleTuple', 'EigenstateResult', 'ElectronicStructureResult', 'VibronicStructur...
true
true
f7661e0026d2a49b8627b21976e9fb1095b45854
196
py
Python
regression/__init__.py
jayliu99/project6
fb99a51e4cbc5a556831394a018f7336d21e7f59
[ "MIT" ]
null
null
null
regression/__init__.py
jayliu99/project6
fb99a51e4cbc5a556831394a018f7336d21e7f59
[ "MIT" ]
null
null
null
regression/__init__.py
jayliu99/project6
fb99a51e4cbc5a556831394a018f7336d21e7f59
[ "MIT" ]
null
null
null
""" BMI203: Biocomputing algorithms Winter 2022 Assignment 6: Logistic regression """ from .logreg import (BaseRegressor, LogisticRegression) from .utils import loadDataset __version__ = '0.1.0'
21.777778
55
0.785714
from .logreg import (BaseRegressor, LogisticRegression) from .utils import loadDataset __version__ = '0.1.0'
true
true
f7661eca0975c144363431fbe603f668544e95f5
3,798
py
Python
ec2price/web.py
grosskur/ec2price
583c665e94bea020329e3193500a04e1e9941bf0
[ "Unlicense" ]
116
2015-03-13T23:31:25.000Z
2022-02-19T09:57:25.000Z
ec2price/web.py
grosskur/ec2price
583c665e94bea020329e3193500a04e1e9941bf0
[ "Unlicense" ]
10
2016-04-02T23:56:37.000Z
2021-03-25T21:40:47.000Z
ec2price/web.py
grosskur/ec2price
583c665e94bea020329e3193500a04e1e9941bf0
[ "Unlicense" ]
34
2015-01-15T00:41:56.000Z
2020-04-29T09:12:29.000Z
""" Web handlers """ import logging import arrow import tornado.web _FMT = 'YYYY-MM-DDTHH:mm:ssZ' logging.getLogger('boto').setLevel(logging.CRITICAL) class BaseHandler(tornado.web.RequestHandler): def initialize(self, model, asset_env, gauges_site_id, ga_tracking_id, ga_domain, google_sit...
31.65
74
0.584255
import logging import arrow import tornado.web _FMT = 'YYYY-MM-DDTHH:mm:ssZ' logging.getLogger('boto').setLevel(logging.CRITICAL) class BaseHandler(tornado.web.RequestHandler): def initialize(self, model, asset_env, gauges_site_id, ga_tracking_id, ga_domain, google_site_verification_id, st...
true
true
f7661febf1519d5c14e0a2559999bea2049a6ce4
16,223
py
Python
research/object_detection/anchor_generators/multiple_grid_anchor_generator.py
Santhanalakshmimano/SpeedBump_detection_usingCV
7b68f260cf1351d757983a48c5a62e063df807c9
[ "Apache-2.0" ]
null
null
null
research/object_detection/anchor_generators/multiple_grid_anchor_generator.py
Santhanalakshmimano/SpeedBump_detection_usingCV
7b68f260cf1351d757983a48c5a62e063df807c9
[ "Apache-2.0" ]
null
null
null
research/object_detection/anchor_generators/multiple_grid_anchor_generator.py
Santhanalakshmimano/SpeedBump_detection_usingCV
7b68f260cf1351d757983a48c5a62e063df807c9
[ "Apache-2.0" ]
1
2021-07-13T01:22:08.000Z
2021-07-13T01:22:08.000Z
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
48.426866
80
0.668619
import numpy as np import tensorflow as tf from anchor_generators import grid_anchor_generator from core import anchor_generator from core import box_list_ops class MultipleGridAnchorGenerator(anchor_generator.AnchorGenerator): def __init__(self, box_specs_list, base_anchor_size=N...
true
true
f76620bde5f3329ea7f6167338758b6d14661481
164
py
Python
dgcn/__init__.py
e0397123/DynaEval
2a409472feb439e0dc7c947c62b2d1e28a626272
[ "Apache-2.0" ]
6
2021-05-14T03:18:10.000Z
2021-08-21T04:13:49.000Z
dgcn/__init__.py
e0397123/DynaEval
2a409472feb439e0dc7c947c62b2d1e28a626272
[ "Apache-2.0" ]
2
2021-09-15T04:32:02.000Z
2021-11-02T08:57:38.000Z
dgcn/__init__.py
e0397123/DynaEval
2a409472feb439e0dc7c947c62b2d1e28a626272
[ "Apache-2.0" ]
1
2021-08-11T06:53:54.000Z
2021-08-11T06:53:54.000Z
import dgcn.utils from .Sample import Sample from .Dataset import Dataset from .Coach import Coach from .model.DialogueGCN import DynaEval from .Optim import Optim
23.428571
39
0.823171
import dgcn.utils from .Sample import Sample from .Dataset import Dataset from .Coach import Coach from .model.DialogueGCN import DynaEval from .Optim import Optim
true
true
f766210882c824489e8ba38fa197b12fbed919a0
18,115
py
Python
syntaxnet/dragnn/python/wrapped_units.py
FrancisTembo/tensorflow-models
042f74690d0cf412cb6b7fc19f4a41afdf547905
[ "Apache-2.0" ]
58
2017-04-21T02:52:30.000Z
2021-03-08T18:58:52.000Z
syntaxnet/dragnn/python/wrapped_units.py
FrancisTembo/tensorflow-models
042f74690d0cf412cb6b7fc19f4a41afdf547905
[ "Apache-2.0" ]
1
2017-03-19T20:12:15.000Z
2017-03-20T14:25:54.000Z
syntaxnet/dragnn/python/wrapped_units.py
FrancisTembo/tensorflow-models
042f74690d0cf412cb6b7fc19f4a41afdf547905
[ "Apache-2.0" ]
60
2016-12-27T12:00:37.000Z
2022-03-11T17:35:11.000Z
"""Network units wrapping TensorFlows' tf.contrib.rnn cells. Please put all wrapping logic for tf.contrib.rnn in this module; this will help collect common subroutines that prove useful. """ import abc import tensorflow as tf from dragnn.python import network_units as dragnn from syntaxnet.util import check class...
39.63895
80
0.690643
import abc import tensorflow as tf from dragnn.python import network_units as dragnn from syntaxnet.util import check class BaseLSTMNetwork(dragnn.NetworkUnitInterface): def __init__(self, component): self._attrs = dragnn.get_attrs_with_defaults( component.spec.network_unit.parameters, defau...
true
true
f76621e56cae63d37cfe62f11e21c57f74fe92b4
1,646
py
Python
Python_Controle_Multimidia_Universal/trunk/Comodo/Channel/Players/Audio.py
felipelindemberg/ControleMultimidiaUniversal
491487411bc63db497943fac78b810ac7e37ef44
[ "Apache-2.0" ]
1
2019-02-15T03:08:07.000Z
2019-02-15T03:08:07.000Z
Python_Controle_Multimidia_Universal/trunk/Comodo/Channel/Players/Audio.py
felipelindemberg/ControleMultimidiaUniversal
491487411bc63db497943fac78b810ac7e37ef44
[ "Apache-2.0" ]
null
null
null
Python_Controle_Multimidia_Universal/trunk/Comodo/Channel/Players/Audio.py
felipelindemberg/ControleMultimidiaUniversal
491487411bc63db497943fac78b810ac7e37ef44
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # coding: utf-8 try: import sys import os import pygame except ImportError, error: print >> sys.stderr, "Erro ao importar o modulo", error os._exit(1) class Audio: """Classe Audio é uma classe para manipular arquivos de Audio :version: 224 :author: Felipe Mi...
27.433333
65
0.580802
try: import sys import os import pygame except ImportError, error: print >> sys.stderr, "Erro ao importar o modulo", error os._exit(1) class Audio: """Classe Audio é uma classe para manipular arquivos de Audio :version: 224 :author: Felipe Miranda """ def __init__(self, ...
false
true
f7662218c5751d474944b06cc8db0c715a6346fc
1,196
py
Python
methyl-opencv-suite/setup.py
methylDragon/methyl-opencv-suite
eeb85175fa6802dc23503641348e5ac9ffc6a123
[ "Apache-2.0" ]
null
null
null
methyl-opencv-suite/setup.py
methylDragon/methyl-opencv-suite
eeb85175fa6802dc23503641348e5ac9ffc6a123
[ "Apache-2.0" ]
null
null
null
methyl-opencv-suite/setup.py
methylDragon/methyl-opencv-suite
eeb85175fa6802dc23503641348e5ac9ffc6a123
[ "Apache-2.0" ]
null
null
null
from setuptools import setup, find_namespace_packages # Package metadata. name = "methyl-opencv-suite" description = "MOS: Utilities and computer vision operations for rapid development with OpenCV" version = "0.0.1" release_status = "Development Status :: 2 - Pre-Alpha" dependencies = [ "opencv-contrib-python", ...
27.813953
95
0.661371
from setuptools import setup, find_namespace_packages name = "methyl-opencv-suite" description = "MOS: Utilities and computer vision operations for rapid development with OpenCV" version = "0.0.1" release_status = "Development Status :: 2 - Pre-Alpha" dependencies = [ "opencv-contrib-python", "numpy", "sci...
true
true
f76622b3c86fb5a8f30e74f2bbc754dd133a786e
36
py
Python
LS/bin/Mailman_Handlers/mailmanlistpath.py
otherio/sels
7119b8631715b932a99675141c81568b818919b1
[ "NCSA" ]
null
null
null
LS/bin/Mailman_Handlers/mailmanlistpath.py
otherio/sels
7119b8631715b932a99675141c81568b818919b1
[ "NCSA" ]
null
null
null
LS/bin/Mailman_Handlers/mailmanlistpath.py
otherio/sels
7119b8631715b932a99675141c81568b818919b1
[ "NCSA" ]
null
null
null
MAILMAN_PATH_VAL="/var/lib/mailman"
18
35
0.805556
MAILMAN_PATH_VAL="/var/lib/mailman"
true
true
f7662336eb632e39a8791f32c933134bf169c67e
3,318
py
Python
script/model/LeVoice.py
bobolee1239/levoice
56f20afe15f9e171b8971e14551180180cb86cfb
[ "MIT" ]
null
null
null
script/model/LeVoice.py
bobolee1239/levoice
56f20afe15f9e171b8971e14551180180cb86cfb
[ "MIT" ]
null
null
null
script/model/LeVoice.py
bobolee1239/levoice
56f20afe15f9e171b8971e14551180180cb86cfb
[ "MIT" ]
null
null
null
# ---------------------------------- # File: LeVoice.py # ---------------------------------- import sys if '..' not in sys.path: sys.path.append('..') import torch import torch.nn.functional as F import config from torch import nn # ----------------------------------------- def pad_freq(x, padding): '...
25.328244
61
0.517179
import sys if '..' not in sys.path: sys.path.append('..') import torch import torch.nn.functional as F import config from torch import nn def pad_freq(x, padding): return F.pad(x, padding, "constant", 0) def pad_time(x, padding): return F.pad(x, (0, 0, *padding), "constant", 0) class LeVoice(...
true
true
f76623cfc24927996111b6a0ececcdcf504def9c
1,046
py
Python
adv/ramona.py
slushiedee/dl
15718bc12a7e119daa8ab078cdcaa0c26739b2d9
[ "Apache-2.0" ]
45
2018-12-30T14:19:37.000Z
2021-01-28T08:16:41.000Z
adv/ramona.py
slushiedee/dl
15718bc12a7e119daa8ab078cdcaa0c26739b2d9
[ "Apache-2.0" ]
23
2019-01-07T22:32:00.000Z
2019-10-04T10:23:02.000Z
adv/ramona.py
slushiedee/dl
15718bc12a7e119daa8ab078cdcaa0c26739b2d9
[ "Apache-2.0" ]
36
2019-01-11T21:38:02.000Z
2021-01-28T08:16:53.000Z
from core.advbase import * from slot.a import * from slot.d import * def module(): return Ramona class Ramona(Adv): a1 = ('primed_att',0.10) a3 = ('bc',0.13) conf = {} conf['slots.a'] = Summer_Paladyns()+Primal_Crisis() conf['slots.burn.a'] = Resounding_Rendition()+Me_and_My_Bestie() conf[...
24.904762
71
0.564054
from core.advbase import * from slot.a import * from slot.d import * def module(): return Ramona class Ramona(Adv): a1 = ('primed_att',0.10) a3 = ('bc',0.13) conf = {} conf['slots.a'] = Summer_Paladyns()+Primal_Crisis() conf['slots.burn.a'] = Resounding_Rendition()+Me_and_My_Bestie() conf[...
true
true
f7662412921e55787cf9fc0f8b5f95a1fc5a8884
1,563
py
Python
qpf_example.py
eastwind2000/qpf_blender_prototype
0908d4481e567a486347005f345bc17981a8fc26
[ "MIT" ]
null
null
null
qpf_example.py
eastwind2000/qpf_blender_prototype
0908d4481e567a486347005f345bc17981a8fc26
[ "MIT" ]
null
null
null
qpf_example.py
eastwind2000/qpf_blender_prototype
0908d4481e567a486347005f345bc17981a8fc26
[ "MIT" ]
null
null
null
from pylab import * from scipy import stats import pandas as pd ens1 = np.array([ 5. , 6. , 6. , 7. , 9.72, 9.89, 10.15, 10.16, 10.26, 10.49, 10.56, 10.86]) ens2 = np.array([ 9.18, 9.42, 9.45, 9.91, 9.96, 10.3 , 10.45, 10.55, 11.08, 11.12, 11.54, 11.74]) combine = np.append(ens1, ens2) x=ara...
20.298701
103
0.621881
from pylab import * from scipy import stats import pandas as pd ens1 = np.array([ 5. , 6. , 6. , 7. , 9.72, 9.89, 10.15, 10.16, 10.26, 10.49, 10.56, 10.86]) ens2 = np.array([ 9.18, 9.42, 9.45, 9.91, 9.96, 10.3 , 10.45, 10.55, 11.08, 11.12, 11.54, 11.74]) combine = np.append(ens1, ens2) x=ara...
true
true
f7662455abfd48d3c3f8d3bab20f197799cb039f
159
py
Python
web/apps/recipes/admin.py
marygraceblair/Food_Waste_Tracker
accd652a9117821a42f6acb6456c7374b99500eb
[ "MIT" ]
null
null
null
web/apps/recipes/admin.py
marygraceblair/Food_Waste_Tracker
accd652a9117821a42f6acb6456c7374b99500eb
[ "MIT" ]
null
null
null
web/apps/recipes/admin.py
marygraceblair/Food_Waste_Tracker
accd652a9117821a42f6acb6456c7374b99500eb
[ "MIT" ]
null
null
null
from django.contrib import admin from .models import Food, Reciept, Survey admin.site.register(Food) admin.site.register(Reciept) admin.site.register(Survey)
22.714286
41
0.811321
from django.contrib import admin from .models import Food, Reciept, Survey admin.site.register(Food) admin.site.register(Reciept) admin.site.register(Survey)
true
true
f766246183348e6a25279c753f93630bb0462c75
77,778
py
Python
tests/ethereum/EVM/test_EVMBYTE.py
dmgress/manticore
61a5f934363980705ea1eea9717600eff005791b
[ "Apache-2.0" ]
null
null
null
tests/ethereum/EVM/test_EVMBYTE.py
dmgress/manticore
61a5f934363980705ea1eea9717600eff005791b
[ "Apache-2.0" ]
null
null
null
tests/ethereum/EVM/test_EVMBYTE.py
dmgress/manticore
61a5f934363980705ea1eea9717600eff005791b
[ "Apache-2.0" ]
null
null
null
import struct import unittest import json from manticore.platforms import evm from manticore.core import state from manticore.core.smtlib import Operators, ConstraintSet import os class EVMTest_BYTE(unittest.TestCase): _multiprocess_can_split_ = True maxDiff = None def _execute(self, new_vm): las...
40.871256
100
0.659827
import struct import unittest import json from manticore.platforms import evm from manticore.core import state from manticore.core.smtlib import Operators, ConstraintSet import os class EVMTest_BYTE(unittest.TestCase): _multiprocess_can_split_ = True maxDiff = None def _execute(self, new_vm): las...
true
true
f766246afb682c2ab59a5e1116e1d1ab14858d30
327
py
Python
inventory/devices/admin.py
sloria/device-inventory
ca0a50be7a121c9d5fdfa303cb83912a8474463a
[ "BSD-3-Clause" ]
4
2017-10-19T17:19:06.000Z
2020-12-16T19:07:05.000Z
inventory/devices/admin.py
sloria/device-inventory
ca0a50be7a121c9d5fdfa303cb83912a8474463a
[ "BSD-3-Clause" ]
null
null
null
inventory/devices/admin.py
sloria/device-inventory
ca0a50be7a121c9d5fdfa303cb83912a8474463a
[ "BSD-3-Clause" ]
4
2017-11-10T15:00:37.000Z
2021-04-22T11:38:17.000Z
from django.contrib import admin from django.contrib.contenttypes.generic import GenericStackedInline from reversion import VersionAdmin from inventory.devices.models import Ipad class IpadAdmin(VersionAdmin): list_display = ['lender', 'lendee', 'status','condition', 'updated_at'] admin.site.register(Ipad, Ipa...
27.25
75
0.801223
from django.contrib import admin from django.contrib.contenttypes.generic import GenericStackedInline from reversion import VersionAdmin from inventory.devices.models import Ipad class IpadAdmin(VersionAdmin): list_display = ['lender', 'lendee', 'status','condition', 'updated_at'] admin.site.register(Ipad, Ipa...
true
true
f76624ff46e9d8bdf7abedde964bbf0fa6ef5476
4,773
py
Python
huaweicloud-sdk-ecs/huaweicloudsdkecs/v2/model/server_attachable_quantity.py
wuchen-huawei/huaweicloud-sdk-python-v3
3683d703f4320edb2b8516f36f16d485cff08fc2
[ "Apache-2.0" ]
1
2021-04-16T07:59:28.000Z
2021-04-16T07:59:28.000Z
huaweicloud-sdk-ecs/huaweicloudsdkecs/v2/model/server_attachable_quantity.py
wuchen-huawei/huaweicloud-sdk-python-v3
3683d703f4320edb2b8516f36f16d485cff08fc2
[ "Apache-2.0" ]
null
null
null
huaweicloud-sdk-ecs/huaweicloudsdkecs/v2/model/server_attachable_quantity.py
wuchen-huawei/huaweicloud-sdk-python-v3
3683d703f4320edb2b8516f36f16d485cff08fc2
[ "Apache-2.0" ]
1
2022-01-17T02:24:18.000Z
2022-01-17T02:24:18.000Z
# coding: utf-8 import pprint import re import six class ServerAttachableQuantity: """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the...
25.388298
85
0.568615
import pprint import re import six class ServerAttachableQuantity: sensitive_list = [] openapi_types = { 'free_scsi': 'int', 'free_blk': 'int', 'free_disk': 'int', 'free_nic': 'int' } attribute_map = { 'free_scsi': 'free_scsi', 'free_blk': 'fre...
true
true
f7662516b4f1b91d32bc4011bcd5b65c913b90d2
16,069
py
Python
tensorflow/python/ops/clip_ops.py
Arushacked/tensorflow
9abd61ae0b2d239d3060cdd3d46b54a105159828
[ "Apache-2.0" ]
78
2020-08-04T12:36:25.000Z
2022-03-25T04:23:40.000Z
tensorflow/python/ops/clip_ops.py
Arushacked/tensorflow
9abd61ae0b2d239d3060cdd3d46b54a105159828
[ "Apache-2.0" ]
203
2019-06-14T23:53:10.000Z
2022-02-10T02:27:23.000Z
tensorflow/python/ops/clip_ops.py
Arushacked/tensorflow
9abd61ae0b2d239d3060cdd3d46b54a105159828
[ "Apache-2.0" ]
28
2020-02-10T07:03:06.000Z
2022-01-12T11:19:20.000Z
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
37.544393
80
0.694194
from __future__ import absolute_import from __future__ import division from __future__ import print_function import six from tensorflow.python.framework import constant_op from tensorflow.python.framework import dtypes from tensorflow.python.framework import ops from tensorflow.python.ops import array_ops from tenso...
true
true
f76625869879275c4232c222e02aa9887d9797b9
29,108
py
Python
sdks/python/apache_beam/coders/coders.py
samwagg/beam
a3e262b96be5e6507f3c38413341b4ab607ade41
[ "Apache-2.0" ]
null
null
null
sdks/python/apache_beam/coders/coders.py
samwagg/beam
a3e262b96be5e6507f3c38413341b4ab607ade41
[ "Apache-2.0" ]
null
null
null
sdks/python/apache_beam/coders/coders.py
samwagg/beam
a3e262b96be5e6507f3c38413341b4ab607ade41
[ "Apache-2.0" ]
null
null
null
# # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not us...
29.611394
80
0.708225
from __future__ import absolute_import import base64 import cPickle as pickle import google.protobuf from google.protobuf import wrappers_pb2 from apache_beam.coders import coder_impl from apache_beam.portability import common_urns from apache_beam.portability import python_urns from apache_beam.portability.api imp...
true
true
f76625c07c5f6e180065de5b0f75644067c43798
40,588
py
Python
test/test_tensors.py
ajey091/neml
23dd2cdb83057fdd17a37fa19f4592c54f821dbf
[ "MIT" ]
null
null
null
test/test_tensors.py
ajey091/neml
23dd2cdb83057fdd17a37fa19f4592c54f821dbf
[ "MIT" ]
null
null
null
test/test_tensors.py
ajey091/neml
23dd2cdb83057fdd17a37fa19f4592c54f821dbf
[ "MIT" ]
null
null
null
#!/usr/bin/env python from neml.math import tensors import common import unittest import numpy as np import numpy.linalg as la class TestVector(unittest.TestCase): def setUp(self): self.a = np.array([2.2,-1.2,2.5]) self.b = np.array([0.0,5.8,1.1]) self.va = tensors.Vector(self.a) self.vb = tensor...
41.416327
124
0.626959
from neml.math import tensors import common import unittest import numpy as np import numpy.linalg as la class TestVector(unittest.TestCase): def setUp(self): self.a = np.array([2.2,-1.2,2.5]) self.b = np.array([0.0,5.8,1.1]) self.va = tensors.Vector(self.a) self.vb = tensors.Vector(self.b) ...
true
true
f76626334b1ac6609229af8f8215494e7b90ee6b
54,398
py
Python
jax/core.py
dirmeier/jax
9ba28d263479ed5b9cada97bf73aec92ccc69bc6
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
jax/core.py
dirmeier/jax
9ba28d263479ed5b9cada97bf73aec92ccc69bc6
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
jax/core.py
dirmeier/jax
9ba28d263479ed5b9cada97bf73aec92ccc69bc6
[ "ECL-2.0", "Apache-2.0" ]
1
2020-07-17T18:17:31.000Z
2020-07-17T18:17:31.000Z
# Copyright 2018 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
32.948516
159
0.677176
import operator from operator import attrgetter from contextlib import contextmanager, suppress from collections import namedtuple from functools import total_ordering import itertools as it from weakref import ref import threading import types from typing import (Any, Callable, ClassVar, Dict, Generator, ...
true
true
f76626584ae69255a500c66a862a404ad4cab60b
1,773
py
Python
fixture/session.py
Oliebert/Testing_training
e77f60e6e6d895740cb6806ea023b72d17533835
[ "Apache-2.0" ]
null
null
null
fixture/session.py
Oliebert/Testing_training
e77f60e6e6d895740cb6806ea023b72d17533835
[ "Apache-2.0" ]
null
null
null
fixture/session.py
Oliebert/Testing_training
e77f60e6e6d895740cb6806ea023b72d17533835
[ "Apache-2.0" ]
null
null
null
''' ein Class for login und logout session ''' class SessionHelper: def __init__(self, app): self.app = app def login(self, username, password): wd = self.app.wd # Zugang zu Driver wird benötigt self.app.open_home_page() wd.find_element_by_name("user").cl...
32.833333
164
0.602369
class SessionHelper: def __init__(self, app): self.app = app def login(self, username, password): wd = self.app.wd self.app.open_home_page() wd.find_element_by_name("user").click() wd.find_element_by_name("user").clear() wd.find_element_by...
true
true
f76627237b8d575ed0b6469458832353da029f74
782
py
Python
lib/googlecloudsdk/api_lib/logging/__init__.py
kustodian/google-cloud-sdk
b6bae4137d4b58030adb3dcb1271216dfb19f96d
[ "Apache-2.0" ]
2
2019-11-10T09:17:07.000Z
2019-12-18T13:44:08.000Z
lib/googlecloudsdk/api_lib/logging/__init__.py
kustodian/google-cloud-sdk
b6bae4137d4b58030adb3dcb1271216dfb19f96d
[ "Apache-2.0" ]
11
2020-02-29T02:51:12.000Z
2022-03-30T23:20:08.000Z
lib/googlecloudsdk/api_lib/logging/__init__.py
kustodian/google-cloud-sdk
b6bae4137d4b58030adb3dcb1271216dfb19f96d
[ "Apache-2.0" ]
1
2020-07-25T01:40:19.000Z
2020-07-25T01:40:19.000Z
# -*- coding: utf-8 -*- # # Copyright 2014 Google LLC. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requir...
35.545455
74
0.763427
from __future__ import absolute_import from __future__ import division from __future__ import unicode_literals
true
true
f76627643443d018f1492624a524413f7bcee39b
5,181
py
Python
src/modules/slicing/slicing.py
icst-2020-submission/cbmc-with-kInduction
75940a1ef9b0c962d23c1e793caeb2b237e9b85e
[ "MIT" ]
2
2019-10-09T09:17:14.000Z
2021-06-21T06:27:49.000Z
src/modules/slicing/slicing.py
icst-2020-submission/cbmc-with-kInduction
75940a1ef9b0c962d23c1e793caeb2b237e9b85e
[ "MIT" ]
null
null
null
src/modules/slicing/slicing.py
icst-2020-submission/cbmc-with-kInduction
75940a1ef9b0c962d23c1e793caeb2b237e9b85e
[ "MIT" ]
null
null
null
""" This module uses Frama-C to apply static slicing on the given input. In its default setting, it slices on the reachability of __VERIFIER_error and assert calls. """ import os import re import subprocess import sys import tempfile from pycparser import c_ast from pycparserext.ext_c_generator import GnuCGenerator f...
41.782258
117
0.731519
import os import re import subprocess import sys import tempfile from pycparser import c_ast from pycparserext.ext_c_generator import GnuCGenerator from pycparserext.ext_c_parser import GnuCParser, FuncDeclExt, TypeDeclExt class SwitchDeclarationFinderAndMover(c_ast.NodeVisitor): def __init__(self): self.parents...
true
true
f766282394ba1ad2101c019c5988e316ece57279
12,055
py
Python
omd/versions/1.2.8p15.cre/share/check_mk/web/plugins/dashboard/builtin.py
NCAR/spol-nagios
4f88bef953983050bc6568d3f1027615fbe223fb
[ "BSD-3-Clause" ]
null
null
null
omd/versions/1.2.8p15.cre/share/check_mk/web/plugins/dashboard/builtin.py
NCAR/spol-nagios
4f88bef953983050bc6568d3f1027615fbe223fb
[ "BSD-3-Clause" ]
null
null
null
omd/versions/1.2.8p15.cre/share/check_mk/web/plugins/dashboard/builtin.py
NCAR/spol-nagios
4f88bef953983050bc6568d3f1027615fbe223fb
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/python # -*- encoding: utf-8; py-indent-offset: 4 -*- # +------------------------------------------------------------------+ # | ____ _ _ __ __ _ __ | # | / ___| |__ ___ ___| | __ | \/ | |/ / | # | | | | '_ \ / _ \/ __| |/ /...
37.437888
100
0.391041
builtin_dashboards["main"] = { "single_infos": [], "context" : {}, "mtime" : 0, "show_title" : True, "title" : _("Main Overview"), "topic" : _("Overview"), "description" : _("This dashboard gives you a general overview on the state of your " "mon...
true
true
f76629039af14318c65f003529f45ec5d3c4af7e
3,283
py
Python
tests/tests/test_update_device_status.py
alfrunes/workflows
2e335c5850afacc125337d9528679f986a0ff3ea
[ "Apache-2.0" ]
null
null
null
tests/tests/test_update_device_status.py
alfrunes/workflows
2e335c5850afacc125337d9528679f986a0ff3ea
[ "Apache-2.0" ]
16
2021-03-29T07:43:49.000Z
2021-06-21T10:58:48.000Z
tests/tests/test_update_device_status.py
alfrunes/workflows
2e335c5850afacc125337d9528679f986a0ff3ea
[ "Apache-2.0" ]
null
null
null
# Copyright 2021 Northern.tech AS # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
36.076923
88
0.584831
import requests import time def test_update_device_status(mmock_url, workflows_url): request_id = "1234567890" device_status = "accepted" devices = ( '[{"id":"1", "revision":1}, {"id":"2", "revision":1}, {"id":"3", "revision":1}]' ) tenant_id = "1" res = requests.post( work...
true
true
f7662abf44effdf35eff52e4b3d94d634e2c4cc4
11,962
py
Python
image_classification/PiT/pit.py
haribhutanadhu/PaddleViT
05319fb775606874d8d3024964f1823f1ac56134
[ "Apache-2.0" ]
null
null
null
image_classification/PiT/pit.py
haribhutanadhu/PaddleViT
05319fb775606874d8d3024964f1823f1ac56134
[ "Apache-2.0" ]
null
null
null
image_classification/PiT/pit.py
haribhutanadhu/PaddleViT
05319fb775606874d8d3024964f1823f1ac56134
[ "Apache-2.0" ]
1
2022-01-21T19:03:53.000Z
2022-01-21T19:03:53.000Z
# Copyright (c) 2021 PPViT Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable l...
29.535802
87
0.545979
import math from functools import partial import paddle import paddle.nn as nn import paddle.nn.functional as F from droppath import DropPath trunc_normal_ = nn.initializer.TruncatedNormal(std=0.02) zeros_ = nn.initializer.Constant(value=0.0) ones_ = nn.initializer.Constant(value=1.0) class Identity(nn.Layer): ...
true
true