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
f771b9f93ded49f1eff18efb2cd99c4224b2cd1a
3,835
py
Python
Task 3/task3_most_common_sense.py
DungLe13/FunWithPun
150db22465f2c6d6cf47ab59563122467cd8da79
[ "Apache-2.0" ]
2
2019-01-13T09:32:07.000Z
2019-02-25T16:19:08.000Z
Task 3/task3_most_common_sense.py
DungLe13/FunWithPun
150db22465f2c6d6cf47ab59563122467cd8da79
[ "Apache-2.0" ]
null
null
null
Task 3/task3_most_common_sense.py
DungLe13/FunWithPun
150db22465f2c6d6cf47ab59563122467cd8da79
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 """ task3_most_common_sense.py - Task 3: Pun Interpretation using most common sense for sense2 Author: Dung Le (dungle@bennington.edu) Date: 11/13/2017 """ import xml.etree.ElementTree as ET import nltk from nltk.corpus import stopwords from nltk.corpus import wordnet as wn from nltk...
35.841121
129
0.593742
import xml.etree.ElementTree as ET import nltk from nltk.corpus import stopwords from nltk.corpus import wordnet as wn from nltk.stem.wordnet import WordNetLemmatizer from nltk.stem.porter import PorterStemmer from nltk.corpus import treebank from nltk.tag import hmm def get_pun_word(): pun_words = [] for chi...
true
true
f771baa9970acf2d5220cc5a695524f863d402e5
500
py
Python
test/test_binding_prediction_collection.py
Amfgcp/mhctools
3253a6913ab1861c56f4d86368afb24801a77a6c
[ "Apache-2.0" ]
47
2018-01-25T16:16:22.000Z
2022-03-21T13:59:52.000Z
test/test_binding_prediction_collection.py
Amfgcp/mhctools
3253a6913ab1861c56f4d86368afb24801a77a6c
[ "Apache-2.0" ]
117
2015-03-30T21:34:38.000Z
2017-12-04T18:45:42.000Z
test/test_binding_prediction_collection.py
Amfgcp/mhctools
3253a6913ab1861c56f4d86368afb24801a77a6c
[ "Apache-2.0" ]
11
2018-12-04T22:39:16.000Z
2021-11-11T16:02:43.000Z
from nose.tools import eq_ from mhctools import BindingPrediction, BindingPredictionCollection def test_collection_to_dataframe(): bp = BindingPrediction( peptide="SIINFEKL", allele="A0201", affinity=1.5, percentile_rank=0.1) collection = BindingPredictionCollection([bp]) df...
31.25
67
0.686
from nose.tools import eq_ from mhctools import BindingPrediction, BindingPredictionCollection def test_collection_to_dataframe(): bp = BindingPrediction( peptide="SIINFEKL", allele="A0201", affinity=1.5, percentile_rank=0.1) collection = BindingPredictionCollection([bp]) df...
true
true
f771bb3a72f8505f458db849a80a785e33746467
344
py
Python
server/admin.py
lancha90/menu
c75c9f8630dedfd3b1f8e0a558033c0cd668db02
[ "Apache-2.0" ]
null
null
null
server/admin.py
lancha90/menu
c75c9f8630dedfd3b1f8e0a558033c0cd668db02
[ "Apache-2.0" ]
null
null
null
server/admin.py
lancha90/menu
c75c9f8630dedfd3b1f8e0a558033c0cd668db02
[ "Apache-2.0" ]
null
null
null
from django.contrib import admin from server.models import * # Register your models here. admin.site.register(Categorie) admin.site.register(City) admin.site.register(Country) admin.site.register(Details) admin.site.register(Image) admin.site.register(Food) admin.site.register(Restaurant) admin.site.register(Order) ad...
26.461538
32
0.81686
from django.contrib import admin from server.models import * admin.site.register(Categorie) admin.site.register(City) admin.site.register(Country) admin.site.register(Details) admin.site.register(Image) admin.site.register(Food) admin.site.register(Restaurant) admin.site.register(Order) admin.site.register(Table)
true
true
f771bb4b36ad967e471e38d4e9d3c434550b707e
501
py
Python
Ecommerce/migrations/0024_auto_20200215_1926.py
aryanshridhar/Ecommerce-Website
c582659e9b530555b9715ede7bb774c39f101c7e
[ "MIT" ]
1
2020-06-01T16:41:33.000Z
2020-06-01T16:41:33.000Z
Ecommerce/migrations/0024_auto_20200215_1926.py
aryanshridhar/Ecommerce-Website
c582659e9b530555b9715ede7bb774c39f101c7e
[ "MIT" ]
4
2020-03-17T03:37:23.000Z
2021-09-22T18:36:18.000Z
Ecommerce/migrations/0024_auto_20200215_1926.py
aryanshridhar/Ecommerce-Website
c582659e9b530555b9715ede7bb774c39f101c7e
[ "MIT" ]
null
null
null
# Generated by Django 2.2.7 on 2020-02-15 13:56 import datetime from django.db import migrations, models from django.utils.timezone import utc class Migration(migrations.Migration): dependencies = [ ('Ecommerce', '0023_auto_20200215_1728'), ] operations = [ migrations.AlterField( ...
23.857143
111
0.638723
import datetime from django.db import migrations, models from django.utils.timezone import utc class Migration(migrations.Migration): dependencies = [ ('Ecommerce', '0023_auto_20200215_1728'), ] operations = [ migrations.AlterField( model_name='review', name='Dat...
true
true
f771bbf7e179ed81889f20b0ac64b52ab083f71b
60
py
Python
models/__init__.py
elensar92/DETR
ca70e7c488d1ac797fc37e0b4d7e3e6eea3e8623
[ "MIT" ]
null
null
null
models/__init__.py
elensar92/DETR
ca70e7c488d1ac797fc37e0b4d7e3e6eea3e8623
[ "MIT" ]
null
null
null
models/__init__.py
elensar92/DETR
ca70e7c488d1ac797fc37e0b4d7e3e6eea3e8623
[ "MIT" ]
null
null
null
from . import simple_backbone __all__ = ['simple_backbone']
20
29
0.783333
from . import simple_backbone __all__ = ['simple_backbone']
true
true
f771bcaa6fe908f28a81bbcab58139fc0732882d
5,187
py
Python
tfx/orchestration/local/runner_utils.py
TimoKerr/tfx
10d13d57eeac21514fed73118cb43464dada67f1
[ "Apache-2.0" ]
1,813
2019-02-04T17:17:30.000Z
2022-03-29T13:39:30.000Z
tfx/orchestration/local/runner_utils.py
TimoKerr/tfx
10d13d57eeac21514fed73118cb43464dada67f1
[ "Apache-2.0" ]
2,710
2019-02-14T00:41:00.000Z
2022-03-31T07:23:00.000Z
tfx/orchestration/local/runner_utils.py
TimoKerr/tfx
10d13d57eeac21514fed73118cb43464dada67f1
[ "Apache-2.0" ]
731
2019-02-04T17:59:18.000Z
2022-03-31T06:45:51.000Z
"""Utils for pipeline runners for TFleX pipelines.""" # Copyright 2020 Google LLC. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/...
40.209302
89
0.775786
from typing import Optional from absl import logging from tfx.proto.orchestration import local_deployment_config_pb2 from tfx.proto.orchestration import pipeline_pb2 from google.protobuf import any_pb2 from google.protobuf import message def extract_local_deployment_config( pipeline: pipeline_pb2.Pipeline ) -> ...
true
true
f771be3a920903af4193bb25f94a0bd953367fcc
283
py
Python
pyspark/Codes/sparkcontext/sparkContext.py
zephyrGit/Pyspark
6a230f5facc3e840d798a5263b362ce9676d55d7
[ "Apache-2.0" ]
null
null
null
pyspark/Codes/sparkcontext/sparkContext.py
zephyrGit/Pyspark
6a230f5facc3e840d798a5263b362ce9676d55d7
[ "Apache-2.0" ]
null
null
null
pyspark/Codes/sparkcontext/sparkContext.py
zephyrGit/Pyspark
6a230f5facc3e840d798a5263b362ce9676d55d7
[ "Apache-2.0" ]
null
null
null
from pyspark import SparkContext from pyspark import SparkConf conf = SparkConf() #conf.set('master','local') conf.set('master','spark://hadoop-maste:7077') sparkContext = SparkContext(conf=conf) rdd = sparkContext.parallelize(range(100)) print(rdd.collect()) sparkContext.stop()
21.769231
46
0.763251
from pyspark import SparkContext from pyspark import SparkConf conf = SparkConf() conf.set('master','spark://hadoop-maste:7077') sparkContext = SparkContext(conf=conf) rdd = sparkContext.parallelize(range(100)) print(rdd.collect()) sparkContext.stop()
true
true
f771be4369381138764a84e6249e50dbfaf2f713
686
py
Python
Modules/Module7/Labs/2_hurricanes_report.py
hackettccp/CSCI111
129b2120dbedb54e7964b9d915e2457962cf55e2
[ "MIT" ]
2
2019-10-23T03:25:37.000Z
2021-02-23T04:09:03.000Z
Modules/Module7/Labs/2_hurricanes_report.py
hackettccp/CSCI111
129b2120dbedb54e7964b9d915e2457962cf55e2
[ "MIT" ]
null
null
null
Modules/Module7/Labs/2_hurricanes_report.py
hackettccp/CSCI111
129b2120dbedb54e7964b9d915e2457962cf55e2
[ "MIT" ]
null
null
null
""" Create a program to read in the data from the hurricanes.txt file which the program will use to create a CSV file. The hurricanes.txt file contains the number hurricanes formed during the months of May through December in the years 2005 to 2010 For each year, have your program calculate the total number of hurric...
26.384615
73
0.77551
true
true
f771beec8c1d4300cf997360ca7e9fc4193e7fe4
11,481
py
Python
test/test_inference/test_signature.py
mrclary/jedi
803c3cb271ead297c4fe3ca916b54ed05a623459
[ "MIT" ]
10
2020-07-21T21:59:54.000Z
2021-07-19T11:01:47.000Z
test/test_inference/test_signature.py
mrclary/jedi
803c3cb271ead297c4fe3ca916b54ed05a623459
[ "MIT" ]
null
null
null
test/test_inference/test_signature.py
mrclary/jedi
803c3cb271ead297c4fe3ca916b54ed05a623459
[ "MIT" ]
1
2021-01-30T18:17:01.000Z
2021-01-30T18:17:01.000Z
from textwrap import dedent from operator import ge, lt import re import os import pytest from jedi.inference.gradual.conversion import _stub_to_python_value_set from ..helpers import get_example_dir @pytest.mark.parametrize( 'code, sig, names, op, version', [ ('import math; math.cos', 'cos(x, /)', ['x'...
33.472303
100
0.517725
from textwrap import dedent from operator import ge, lt import re import os import pytest from jedi.inference.gradual.conversion import _stub_to_python_value_set from ..helpers import get_example_dir @pytest.mark.parametrize( 'code, sig, names, op, version', [ ('import math; math.cos', 'cos(x, /)', ['x'...
true
true
f771bf3a1c2db93ef570f30c705357d5d8a1de02
977
py
Python
jtnn/datautils.py
brianhie/icml18-jtnn
8dbd0faaf3d1bb9b263096a583417a646e4371a4
[ "MIT" ]
5
2021-06-07T19:59:57.000Z
2022-01-17T19:49:19.000Z
jtnn/datautils.py
brianhie/icml18-jtnn
8dbd0faaf3d1bb9b263096a583417a646e4371a4
[ "MIT" ]
1
2021-10-15T09:20:59.000Z
2021-10-15T09:20:59.000Z
jtnnencoder/jtnn/datautils.py
LiamWilbraham/jtnnencoder
fabede920d7def1d248c3157dd31f7cc5a2132e0
[ "MIT" ]
1
2020-11-24T16:17:11.000Z
2020-11-24T16:17:11.000Z
from torch.utils.data import Dataset from .mol_tree import MolTree import numpy as np class MoleculeDataset(Dataset): def __init__(self, data_file): with open(data_file) as f: self.data = [line.strip("\r\n ").split()[0] for line in f] def __len__(self): return len(self.data) ...
26.405405
70
0.619243
from torch.utils.data import Dataset from .mol_tree import MolTree import numpy as np class MoleculeDataset(Dataset): def __init__(self, data_file): with open(data_file) as f: self.data = [line.strip("\r\n ").split()[0] for line in f] def __len__(self): return len(self.data) ...
true
true
f771bf554f88da9468c16de57e58f13e39cd6462
3,296
py
Python
rest-service/manager_rest/rest/resources_v1/provider_context.py
TS-at-WS/cloudify-manager
3e062e8dec16c89d2ab180d0b761cbf76d3f7ddc
[ "Apache-2.0" ]
null
null
null
rest-service/manager_rest/rest/resources_v1/provider_context.py
TS-at-WS/cloudify-manager
3e062e8dec16c89d2ab180d0b761cbf76d3f7ddc
[ "Apache-2.0" ]
null
null
null
rest-service/manager_rest/rest/resources_v1/provider_context.py
TS-at-WS/cloudify-manager
3e062e8dec16c89d2ab180d0b761cbf76d3f7ddc
[ "Apache-2.0" ]
null
null
null
######### # Copyright (c) 2017 GigaSpaces Technologies Ltd. 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...
33.632653
93
0.680825
from flask_restful.reqparse import Argument from flask_restful_swagger import swagger from flask_restful.inputs import boolean from dsl_parser import utils as dsl_parser_utils from manager_rest import manager_exceptions from manager_rest.constants import PROVIDER_CONTEXT_ID from manager_rest.resource_manager import g...
false
true
f771c1722da264fe77a31c8b6bee35dbef88ff8e
6,652
py
Python
install.py
ryosan-470/dotfiles
a57e8d8d84ef171a7e2f07e727480d14b6a50947
[ "MIT" ]
5
2017-04-24T06:57:31.000Z
2021-03-02T17:47:49.000Z
install.py
ryosan-470/dotfiles
a57e8d8d84ef171a7e2f07e727480d14b6a50947
[ "MIT" ]
17
2017-04-23T14:49:26.000Z
2020-07-29T12:54:41.000Z
install.py
jtwp470/dotfiles
a57e8d8d84ef171a7e2f07e727480d14b6a50947
[ "MIT" ]
2
2017-09-17T02:50:43.000Z
2018-03-30T02:37:16.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import sys import subprocess import shlex import glob try: import argparse except ImportError: sys.exit("Please install or run Python 2.7 or later") HOME = os.path.expanduser("~") # User Home Directory DOTFILES = os.path.join(HOME, ".dotconfig/dotfiles...
27.04065
94
0.600722
import os import sys import subprocess import shlex import glob try: import argparse except ImportError: sys.exit("Please install or run Python 2.7 or later") HOME = os.path.expanduser("~") DOTFILES = os.path.join(HOME, ".dotconfig/dotfiles") ALL_DOTFILES = set(x[len(DOTFILES+"/"):] for x in glob.glob(DOTFI...
true
true
f771c2e57ed2a50fbcd90b98c8568e566ab43d7c
30,845
py
Python
torchtools/models.py
Takezo87/torchtools
4230305d9063dabee3614f0dcd8557739b90f817
[ "Apache-2.0" ]
null
null
null
torchtools/models.py
Takezo87/torchtools
4230305d9063dabee3614f0dcd8557739b90f817
[ "Apache-2.0" ]
1
2022-02-26T06:23:52.000Z
2022-02-26T06:23:52.000Z
torchtools/models.py
Takezo87/torchtools
4230305d9063dabee3614f0dcd8557739b90f817
[ "Apache-2.0" ]
null
null
null
# AUTOGENERATED! DO NOT EDIT! File to edit: 01_models.ipynb (unless otherwise specified). __all__ = ['noop', 'shortcut', 'Inception', 'InceptionBlock', 'InceptionTime', 'Squeeze', 'Unsqueeze', 'Add', 'Concat', 'Permute', 'Transpose', 'View', 'Reshape', 'Max', 'LastStep', 'Noop', 'TransformerModel', ...
39.902975
207
0.619647
__all__ = ['noop', 'shortcut', 'Inception', 'InceptionBlock', 'InceptionTime', 'Squeeze', 'Unsqueeze', 'Add', 'Concat', 'Permute', 'Transpose', 'View', 'Reshape', 'Max', 'LastStep', 'Noop', 'TransformerModel', 'ScaledDotProductAttention', 'MultiHeadAttention', 'TSTEncoderLayer', 'TSTEncoder', 'TS...
true
true
f771c30a913e4d0fb0b31ef2019662d5bddc4ccc
1,540
py
Python
operators/eunomia/python/pulumi_pulumi_kubernetes_crds_operators_eunomia/_tables.py
pulumi/pulumi-kubernetes-crds
372c4c0182f6b899af82d6edaad521aa14f22150
[ "Apache-2.0" ]
null
null
null
operators/eunomia/python/pulumi_pulumi_kubernetes_crds_operators_eunomia/_tables.py
pulumi/pulumi-kubernetes-crds
372c4c0182f6b899af82d6edaad521aa14f22150
[ "Apache-2.0" ]
2
2020-09-18T17:12:23.000Z
2020-12-30T19:40:56.000Z
operators/eunomia/python/pulumi_pulumi_kubernetes_crds_operators_eunomia/_tables.py
pulumi/pulumi-kubernetes-crds
372c4c0182f6b899af82d6edaad521aa14f22150
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # *** WARNING: this file was generated by crd2pulumi. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** SNAKE_TO_CAMEL_CASE_TABLE = { "api_version": "apiVersion", "completion_time": "completionTime", "context_dir": "contextDir", "http_proxy": "httpProxy...
36.666667
80
0.707792
SNAKE_TO_CAMEL_CASE_TABLE = { "api_version": "apiVersion", "completion_time": "completionTime", "context_dir": "contextDir", "http_proxy": "httpProxy", "https_proxy": "httpsProxy", "last_schedule_time": "lastScheduleTime", "no_proxy": "noProxy", "parameter_source": "parameterSource", ...
true
true
f771c3b4fa14a69f2fbebafac4f52293c8c79078
7,751
py
Python
lib/rucio/web/rest/flaskapi/v1/accountlimits.py
fno2010/rucio
47e93cfbe5887071c70de4ba815c1bbdddfac2ce
[ "Apache-2.0" ]
null
null
null
lib/rucio/web/rest/flaskapi/v1/accountlimits.py
fno2010/rucio
47e93cfbe5887071c70de4ba815c1bbdddfac2ce
[ "Apache-2.0" ]
null
null
null
lib/rucio/web/rest/flaskapi/v1/accountlimits.py
fno2010/rucio
47e93cfbe5887071c70de4ba815c1bbdddfac2ce
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright CERN since 2018 # # 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 ...
32.982979
155
0.586505
from flask import Flask, Blueprint, request from rucio.api.account_limit import set_local_account_limit, delete_local_account_limit, set_global_account_limit, \ delete_global_account_limit from rucio.common.exception import RSENotFound, AccessDenied, AccountNotFound from rucio.web.rest.flaskapi.v1.common import r...
true
true
f771c3e1615dcfba96c17f4d0c48874d1a1bcafe
8,667
py
Python
flexget/plugins/api/seen.py
cvium/Flexget
4279058887a77a78052a2a666bf9b8d9b98f5268
[ "MIT" ]
1
2017-08-25T07:17:04.000Z
2017-08-25T07:17:04.000Z
flexget/plugins/api/seen.py
cvium/Flexget
4279058887a77a78052a2a666bf9b8d9b98f5268
[ "MIT" ]
1
2015-11-10T01:07:54.000Z
2015-11-10T01:07:54.000Z
flexget/plugins/api/seen.py
cvium/Flexget
4279058887a77a78052a2a666bf9b8d9b98f5268
[ "MIT" ]
null
null
null
from __future__ import unicode_literals, division, absolute_import import copy from math import ceil from operator import itemgetter from urllib import unquote from flask import jsonify, request from flask_restplus import inputs from flexget.api import api, APIResource from flexget.plugins.filter import seen seen_a...
38.349558
119
0.63136
from __future__ import unicode_literals, division, absolute_import import copy from math import ceil from operator import itemgetter from urllib import unquote from flask import jsonify, request from flask_restplus import inputs from flexget.api import api, APIResource from flexget.plugins.filter import seen seen_a...
true
true
f771c4337f856f0bd190ff4162aa248f4d68e907
68,851
py
Python
mgwr/gwr.py
mehak-sachdeva/mgwr
eae8ac3d61ecbbba60b180e9ed8bab074bfb3522
[ "BSD-3-Clause" ]
null
null
null
mgwr/gwr.py
mehak-sachdeva/mgwr
eae8ac3d61ecbbba60b180e9ed8bab074bfb3522
[ "BSD-3-Clause" ]
null
null
null
mgwr/gwr.py
mehak-sachdeva/mgwr
eae8ac3d61ecbbba60b180e9ed8bab074bfb3522
[ "BSD-3-Clause" ]
null
null
null
# Main GWR classes __author__ = "Taylor Oshan Tayoshan@gmail.com" import copy import numpy as np import numpy.linalg as la from scipy.stats import t from scipy.special import factorial from itertools import combinations as combo from spglm.family import Gaussian, Binomial, Poisson from spglm.glm import GLM, GLMResult...
34.668177
98
0.515359
__author__ = "Taylor Oshan Tayoshan@gmail.com" import copy import numpy as np import numpy.linalg as la from scipy.stats import t from scipy.special import factorial from itertools import combinations as combo from spglm.family import Gaussian, Binomial, Poisson from spglm.glm import GLM, GLMResults from spglm.iwls i...
true
true
f771c4383747b5edd13661559a0053f37b49e495
22,175
py
Python
covid/consensus/block_body_validation.py
grayfallstown/covid-blockchain
194d5351c70d3ee5d928f767e21c7894cfbb59a7
[ "Apache-2.0" ]
null
null
null
covid/consensus/block_body_validation.py
grayfallstown/covid-blockchain
194d5351c70d3ee5d928f767e21c7894cfbb59a7
[ "Apache-2.0" ]
null
null
null
covid/consensus/block_body_validation.py
grayfallstown/covid-blockchain
194d5351c70d3ee5d928f767e21c7894cfbb59a7
[ "Apache-2.0" ]
null
null
null
import collections import logging from typing import Dict, List, Optional, Set, Tuple, Union, Callable from blspy import G1Element from chiabip158 import PyBIP158 from clvm.casts import int_from_bytes from covid.consensus.block_record import BlockRecord from covid.consensus.block_rewards import calculate_base_farmer_...
45.910973
117
0.687576
import collections import logging from typing import Dict, List, Optional, Set, Tuple, Union, Callable from blspy import G1Element from chiabip158 import PyBIP158 from clvm.casts import int_from_bytes from covid.consensus.block_record import BlockRecord from covid.consensus.block_rewards import calculate_base_farmer_...
true
true
f771c4cc05b2a66ea7a49f94c403c95dfb21d91a
15,470
py
Python
kaoz/publishbot.py
fishilico/kaoz
5757a10af8dc83e1c37b022c24514855362040ec
[ "MIT" ]
null
null
null
kaoz/publishbot.py
fishilico/kaoz
5757a10af8dc83e1c37b022c24514855362040ec
[ "MIT" ]
3
2015-06-16T13:03:17.000Z
2018-10-21T15:57:26.000Z
kaoz/publishbot.py
fishilico/kaoz
5757a10af8dc83e1c37b022c24514855362040ec
[ "MIT" ]
2
2015-06-15T19:40:16.000Z
2015-06-15T20:24:39.000Z
# -*- coding: utf-8 -*- # Copyright © 2011-2013 Binet Réseau # See the LICENCE file for more informations # This file is a part of Kaoz, a free irc notifier import irc.client import irc.connection import logging import os import socket import sys import threading import traceback import kaoz.channel if sys.version_...
38.009828
79
0.597479
import irc.client import irc.connection import logging import os import socket import sys import threading import traceback import kaoz.channel if sys.version_info < (3,): import Queue as queue else: import queue try: import ssl has_ssl = True except ImportError: has_ssl = False logger = loggi...
true
true
f771c5d8ca96cd2b2508499fbb10f7b41ceff8e9
70
py
Python
Python/IO/file.py
KrisCheng/HackerPractice
778948db4836e85c9af90267dc9b03d50f29d8e9
[ "MIT" ]
1
2017-06-21T01:50:36.000Z
2017-06-21T01:50:36.000Z
Python/IO/file.py
KrisCheng/HackerPractice
778948db4836e85c9af90267dc9b03d50f29d8e9
[ "MIT" ]
null
null
null
Python/IO/file.py
KrisCheng/HackerPractice
778948db4836e85c9af90267dc9b03d50f29d8e9
[ "MIT" ]
null
null
null
# file IO f = open('test.txt', 'w') f.write('Hello World') f.close()
11.666667
25
0.585714
f = open('test.txt', 'w') f.write('Hello World') f.close()
true
true
f771c5e22e4c6becca180cabf58292a1249b67c0
342
py
Python
helpers/reset_wods_to_subscription_amount.py
acascarla/crossbox
89aa3b7db60fc9c1a391cdff38186c8798f94bdd
[ "MIT" ]
null
null
null
helpers/reset_wods_to_subscription_amount.py
acascarla/crossbox
89aa3b7db60fc9c1a391cdff38186c8798f94bdd
[ "MIT" ]
4
2020-06-05T20:59:05.000Z
2021-09-22T17:53:37.000Z
helpers/reset_wods_to_subscription_amount.py
oalfonso-o/crossbox
0c14b10662ca1b34d1e9847de38a10f058175db6
[ "MIT" ]
null
null
null
from crossbox.models.subscriber import Subscriber def reset_wods_to_subscrition_amount(): for sub in Subscriber.objects.all(): fee = sub.fee if fee: num_sessions = fee.num_sessions sub.wods = num_sessions sub.save() if __name__ == '__main__': reset_wods_to...
22.8
49
0.654971
from crossbox.models.subscriber import Subscriber def reset_wods_to_subscrition_amount(): for sub in Subscriber.objects.all(): fee = sub.fee if fee: num_sessions = fee.num_sessions sub.wods = num_sessions sub.save() if __name__ == '__main__': reset_wods_to...
true
true
f771c614585dc3ab74f76e93428ff0fb79d14e04
3,342
py
Python
algos/rl/policies.py
XiaoSanchez/autophase
3d8d173ad27b9786e36efd22d0ceacbcf1cb1dfb
[ "BSD-3-Clause" ]
14
2020-04-03T12:41:50.000Z
2022-02-04T00:05:01.000Z
algos/rl/policies.py
XiaoSanchez/autophase
3d8d173ad27b9786e36efd22d0ceacbcf1cb1dfb
[ "BSD-3-Clause" ]
2
2020-03-02T04:32:58.000Z
2021-09-15T20:02:25.000Z
algos/rl/policies.py
XiaoSanchez/autophase
3d8d173ad27b9786e36efd22d0ceacbcf1cb1dfb
[ "BSD-3-Clause" ]
8
2020-03-02T10:30:36.000Z
2021-08-03T02:29:38.000Z
# Code in this file is copied and adapted from # https://github.com/openai/evolution-strategies-starter. from __future__ import absolute_import from __future__ import division from __future__ import print_function import gym import numpy as np import tensorflow as tf import ray from ray.rllib.evaluation.sampler impo...
36.326087
79
0.676541
from __future__ import absolute_import from __future__ import division from __future__ import print_function import gym import numpy as np import tensorflow as tf import ray from ray.rllib.evaluation.sampler import _unbatch_tuple_actions from ray.rllib.models import ModelCatalog from ray.rllib.utils.filter import ge...
true
true
f771c6c17533ad92b89a8738b3221cf4bf2d6788
831
py
Python
kubernetes/test/test_core_api.py
woqer/python
3a6fe8231cefe1fa39a0a69d4b2f33044ab32745
[ "Apache-2.0" ]
1
2019-07-12T05:38:06.000Z
2019-07-12T05:38:06.000Z
kubernetes/test/test_core_api.py
woqer/python
3a6fe8231cefe1fa39a0a69d4b2f33044ab32745
[ "Apache-2.0" ]
null
null
null
kubernetes/test/test_core_api.py
woqer/python
3a6fe8231cefe1fa39a0a69d4b2f33044ab32745
[ "Apache-2.0" ]
1
2021-05-18T12:25:56.000Z
2021-05-18T12:25:56.000Z
# coding: utf-8 """ Kubernetes No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: v1.11.3 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import os import sys i...
18.466667
105
0.683514
from __future__ import absolute_import import os import sys import unittest import kubernetes.client from kubernetes.client.rest import ApiException from kubernetes.client.apis.core_api import CoreApi class TestCoreApi(unittest.TestCase): def setUp(self): self.api = kubernetes.client.apis.core_api.C...
true
true
f771c7abec4587368b13d89ddd2a866338f96c23
7,315
py
Python
src/pretalx/submission/models/question.py
MaxRink/pretalx
6f0e944ba1721b0d665b180407b40a558940aca6
[ "Apache-2.0" ]
null
null
null
src/pretalx/submission/models/question.py
MaxRink/pretalx
6f0e944ba1721b0d665b180407b40a558940aca6
[ "Apache-2.0" ]
null
null
null
src/pretalx/submission/models/question.py
MaxRink/pretalx
6f0e944ba1721b0d665b180407b40a558940aca6
[ "Apache-2.0" ]
null
null
null
from django.db import models from django.utils.functional import cached_property from django.utils.translation import ugettext_lazy as _ from i18nfield.fields import I18nCharField from pretalx.common.choices import Choices from pretalx.common.mixins import LogMixin from pretalx.common.phrases import phrases from preta...
31.530172
123
0.626931
from django.db import models from django.utils.functional import cached_property from django.utils.translation import ugettext_lazy as _ from i18nfield.fields import I18nCharField from pretalx.common.choices import Choices from pretalx.common.mixins import LogMixin from pretalx.common.phrases import phrases from preta...
true
true
f771c83ff52f78a45b45e0b4e7c71adc4f3a259a
9,785
py
Python
unicom-task/unicom_index.py
zero942520/myScripts
a72cc4bc3e754db37fe4eb25e6c68d3590efcbad
[ "MIT" ]
3
2021-12-06T15:35:58.000Z
2021-12-06T15:57:18.000Z
unicom-task/unicom_index.py
zero942520/myScripts
a72cc4bc3e754db37fe4eb25e6c68d3590efcbad
[ "MIT" ]
null
null
null
unicom-task/unicom_index.py
zero942520/myScripts
a72cc4bc3e754db37fe4eb25e6c68d3590efcbad
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- ''' cron: 16 6,16 * * * new Env('联通日常任务'); 变量: unicom_config_x,通知服务变量 脚本内或环境变量填写,环境变量优先 通知推送服务环境变量请查看:https://github.com/wuye999/myScripts/blob/main/send.md 环境变量示例: export unicom_config_1="手机号1<<<服务密码1<<<appId1<<<抽奖次数(0-30)中奖几率渺茫<<<手机的imei(可留空)" export unicom_config_2="手机号2<<<服务密码2<<<appId2<<<抽...
31.977124
408
0.560552
unicom_config_1="18825802580<<<888888<<<appppppp8888888888iiiddd<<<0<<<860128045213200" unicom_womail_1="https://nyan.mail.wo.cn/cn/sign/index/index?mobile=aaa&userName=&openId=bbb" PUSH_PLUS_TOKEN="" run_send='yes' import os,sys def abspath(p=''): if '/ql' in os.path.abspath(os.path.dirname(__file__)): ...
true
true
f771c9087613a20b0b5e713933311030b5c2c46b
3,514
py
Python
tests/test_parse_vcf.py
cdeitrick/isolate_parsers
1b6725d086b1ccd53d985d7e010b23a811dbcf20
[ "MIT" ]
null
null
null
tests/test_parse_vcf.py
cdeitrick/isolate_parsers
1b6725d086b1ccd53d985d7e010b23a811dbcf20
[ "MIT" ]
1
2021-06-12T12:22:04.000Z
2021-06-12T12:22:04.000Z
tests/test_parse_vcf.py
cdeitrick/isolate_parsers
1b6725d086b1ccd53d985d7e010b23a811dbcf20
[ "MIT" ]
null
null
null
from dataclasses import dataclass from pathlib import Path from typing import Any, Dict, List, Optional import pandas import pytest from isolateparser.resultparser.parsers import parse_vcf data_folder = Path(__file__).parent / 'data' / 'Clonal_Output' / 'breseq_output' vcf_filename_real = data_folder / "data" / "out...
30.556522
117
0.703187
from dataclasses import dataclass from pathlib import Path from typing import Any, Dict, List, Optional import pandas import pytest from isolateparser.resultparser.parsers import parse_vcf data_folder = Path(__file__).parent / 'data' / 'Clonal_Output' / 'breseq_output' vcf_filename_real = data_folder / "data" / "out...
true
true
f771c967124f25f694349874fa192918ae2c1d77
352
py
Python
preload/resources/cross-origin-module.py
ziransun/wpt
ab8f451eb39eb198584d547f5d965ef54df2a86a
[ "BSD-3-Clause" ]
8
2019-04-09T21:13:05.000Z
2021-11-23T17:25:18.000Z
preload/resources/cross-origin-module.py
ziransun/wpt
ab8f451eb39eb198584d547f5d965ef54df2a86a
[ "BSD-3-Clause" ]
21
2021-03-31T19:48:22.000Z
2022-03-12T00:24:53.000Z
preload/resources/cross-origin-module.py
ziransun/wpt
ab8f451eb39eb198584d547f5d965ef54df2a86a
[ "BSD-3-Clause" ]
11
2019-04-12T01:20:16.000Z
2021-11-23T17:25:02.000Z
def main(request, response): headers = [ ("Content-Type", "text/javascript"), ("Access-Control-Allow-Origin", request.headers.get("Origin")), ("Timing-Allow-Origin", request.headers.get("Origin")), ("Access-Control-Allow-Credentials", "true") ] return headers, "// Cross-orig...
35.2
71
0.625
def main(request, response): headers = [ ("Content-Type", "text/javascript"), ("Access-Control-Allow-Origin", request.headers.get("Origin")), ("Timing-Allow-Origin", request.headers.get("Origin")), ("Access-Control-Allow-Credentials", "true") ] return headers, "// Cross-orig...
true
true
f771ca8402e84c03133a63532c1b6099a8733e10
5,362
py
Python
boards/Pynq-Z2/lib/arduino/arduino_run_usranger.py
louisliuwei/PYNQ-Car
4d07d4194505ec546cf4a6682b28cf5c70c62920
[ "MIT" ]
null
null
null
boards/Pynq-Z2/lib/arduino/arduino_run_usranger.py
louisliuwei/PYNQ-Car
4d07d4194505ec546cf4a6682b28cf5c70c62920
[ "MIT" ]
null
null
null
boards/Pynq-Z2/lib/arduino/arduino_run_usranger.py
louisliuwei/PYNQ-Car
4d07d4194505ec546cf4a6682b28cf5c70c62920
[ "MIT" ]
null
null
null
# Copyright (c) 2019, Xilinx, Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, # this l...
32.895706
96
0.625326
from . import Arduino from . import MOTOR_DIRECTION from . import TIMER from . import MOTOR_PINS __author__ = "zou cong" __copyright__ = "Copyright 2019, Xilinx" ARDUINO_RUN_USRANGER_PROGRAM = "arduino_run_usranger.bin" CONFIG_IOP_SWITCH = 0x1 STOP = 0x3 MOVE = 0x5 DIST...
true
true
f771cae8d99f00dc192a954006eea82afbbae20a
743
py
Python
geekbang/sanguo_v2.py
MiracleWong/PythonBasic
cb8ec59dc646842b41966ea4ea4b1ee66a342eee
[ "MIT" ]
null
null
null
geekbang/sanguo_v2.py
MiracleWong/PythonBasic
cb8ec59dc646842b41966ea4ea4b1ee66a342eee
[ "MIT" ]
null
null
null
geekbang/sanguo_v2.py
MiracleWong/PythonBasic
cb8ec59dc646842b41966ea4ea4b1ee66a342eee
[ "MIT" ]
null
null
null
# -*- coding:utf-8 -*- import re # 读取人物名称 def find_hero(hero): with open('/Users/miraclewong/github/PythonBasic/geekbang/txt/sanguo.txt' ,encoding='GB18030') as f: data = f.read().replace('\n', '') name_num = re.findall(hero, data) # print("主角 %s 出现了 %d 次" %(hero, len(name_num))...
30.958333
79
0.598923
import re def find_hero(hero): with open('/Users/miraclewong/github/PythonBasic/geekbang/txt/sanguo.txt' ,encoding='GB18030') as f: data = f.read().replace('\n', '') name_num = re.findall(hero, data) return len(name_num) name_dict = {} with open('/Users/miraclewong/github/P...
true
true
f771cb229aab4b60ebd68e813e329112d07f9530
11,014
py
Python
experiments/ashvin/icra2021/widowx/sawyer_awac2_drawerhorizontal_close1.py
Asap7772/railrl_evalsawyer
baba8ce634d32a48c7dfe4dc03b123e18e96e0a3
[ "MIT" ]
null
null
null
experiments/ashvin/icra2021/widowx/sawyer_awac2_drawerhorizontal_close1.py
Asap7772/railrl_evalsawyer
baba8ce634d32a48c7dfe4dc03b123e18e96e0a3
[ "MIT" ]
null
null
null
experiments/ashvin/icra2021/widowx/sawyer_awac2_drawerhorizontal_close1.py
Asap7772/railrl_evalsawyer
baba8ce634d32a48c7dfe4dc03b123e18e96e0a3
[ "MIT" ]
null
null
null
import rlkit.misc.hyperparameter as hyp from rlkit.demos.source.dict_to_mdp_path_loader import EncoderDictToMDPPathLoader from rlkit.launchers.experiments.ashvin.awac_rig import awac_rig_experiment from rlkit.launchers.launcher_util import run_experiment from rlkit.launchers.arglauncher import run_variants from rlkit.t...
35.644013
126
0.61104
import rlkit.misc.hyperparameter as hyp from rlkit.demos.source.dict_to_mdp_path_loader import EncoderDictToMDPPathLoader from rlkit.launchers.experiments.ashvin.awac_rig import awac_rig_experiment from rlkit.launchers.launcher_util import run_experiment from rlkit.launchers.arglauncher import run_variants from rlkit.t...
true
true
f771cc028fb2cde80a3f45a03fb60bd53afa0162
12,301
py
Python
steinbock/preprocessing/imc.py
koetjen/steinbock
b0abcc16120f7a028167cc0a6f9b4f78d010844b
[ "MIT" ]
20
2021-04-14T23:03:49.000Z
2022-03-26T15:32:57.000Z
steinbock/preprocessing/imc.py
koetjen/steinbock
b0abcc16120f7a028167cc0a6f9b4f78d010844b
[ "MIT" ]
110
2021-04-20T16:40:35.000Z
2022-03-29T07:55:35.000Z
steinbock/preprocessing/imc.py
koetjen/steinbock
b0abcc16120f7a028167cc0a6f9b4f78d010844b
[ "MIT" ]
3
2021-12-28T05:23:31.000Z
2022-03-03T13:22:10.000Z
import logging import numpy as np import pandas as pd import re from os import PathLike from pathlib import Path from scipy.ndimage import maximum_filter from typing import ( Generator, List, Optional, Sequence, Tuple, Union, ) from steinbock import io try: from readimc import MCDFile, TX...
38.201863
79
0.535241
import logging import numpy as np import pandas as pd import re from os import PathLike from pathlib import Path from scipy.ndimage import maximum_filter from typing import ( Generator, List, Optional, Sequence, Tuple, Union, ) from steinbock import io try: from readimc import MCDFile, TX...
true
true
f771cd17334178724e05af92fbdddd1c78c06044
15,736
py
Python
s2py3/lib/python3.6/site-packages/tensorflow/core/framework/cost_graph_pb2.py
starcraft2-ai/python-env
4504696381b8721b9e9914f8ba8d17241348ecf8
[ "MIT" ]
1
2019-06-27T12:09:44.000Z
2019-06-27T12:09:44.000Z
s2py3/lib/python3.6/site-packages/tensorflow/core/framework/cost_graph_pb2.py
starcraft2-ai/python-env
4504696381b8721b9e9914f8ba8d17241348ecf8
[ "MIT" ]
13
2020-01-28T22:20:14.000Z
2022-03-11T23:20:14.000Z
s2py3/lib/python3.6/site-packages/tensorflow/core/framework/cost_graph_pb2.py
starcraft2-ai/python-env
4504696381b8721b9e9914f8ba8d17241348ecf8
[ "MIT" ]
null
null
null
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: tensorflow/core/framework/cost_graph.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobu...
47.829787
1,559
0.76093
import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database from google.p...
true
true
f771cd624f75558b43c457c60959bf2cfde89e37
224
py
Python
timeit_test.py
abdullahi318/learn-python
62ea4750ff291c9be90362018f77047e1af9d63d
[ "MIT" ]
2
2021-07-22T00:17:16.000Z
2021-12-24T10:03:57.000Z
timeit_test.py
salisu14/learn-python-programming
a1d3d8206850199d8fab1321a432bd3f1fc0a6a1
[ "MIT" ]
2
2021-04-17T10:22:21.000Z
2021-04-25T11:36:08.000Z
timeit_test.py
salisu14/learn-python-programming
a1d3d8206850199d8fab1321a432bd3f1fc0a6a1
[ "MIT" ]
1
2021-04-19T13:20:35.000Z
2021-04-19T13:20:35.000Z
#!/usr/bin/env python3 import timeit def main(): timeit.timeit('"-".join(str(n) for n in range(100))', number=10000) #print(f"List populated in {toc - tic:0.4f} seconds") if __name__ == "__main__": main()
17.230769
71
0.620536
import timeit def main(): timeit.timeit('"-".join(str(n) for n in range(100))', number=10000) if __name__ == "__main__": main()
true
true
f771cf60254c3df337197ec2d63163ec2375cb9d
10,476
py
Python
collections/ansible_collections/community/general/plugins/modules/packaging/language/pipx.py
escalate/my-smart-home
a9579c845761b980515ff34d2a95568c6e7c2b6c
[ "MIT" ]
22
2021-07-16T08:11:22.000Z
2022-03-31T07:15:34.000Z
Ansible-AWS-Provisioning/collections/ansible_collections/community/general/plugins/modules/packaging/language/pipx.py
premsagar0228/ansible-real-life
1a51193b833ab6ad320100472333b9ffb0da39d4
[ "MIT" ]
1
2022-03-12T02:25:26.000Z
2022-03-12T02:25:26.000Z
Ansible-AWS-Provisioning/collections/ansible_collections/community/general/plugins/modules/packaging/language/pipx.py
premsagar0228/ansible-real-life
1a51193b833ab6ad320100472333b9ffb0da39d4
[ "MIT" ]
39
2021-07-05T02:31:42.000Z
2022-03-31T02:46:03.000Z
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2021, Alexei Znamensky <russoz@gmail.com> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type DOCUMENTATION = ''' --- module: pipx short_desc...
36.757895
134
0.610443
from __future__ import absolute_import, division, print_function __metaclass__ = type DOCUMENTATION = ''' --- module: pipx short_description: Manages applications installed with pipx version_added: 3.8.0 description: - Manage Python applications installed in isolated virtualenvs using pipx. options: state: ...
true
true
f771d09ab9379a2ee65cc609cceb0e799672bb77
2,104
py
Python
ships/gametest/getchannel.py
spaceexpanse/libxayagame
a68e0bc3ff775cdf6ab335c23e3c74e2e4903eba
[ "MIT" ]
null
null
null
ships/gametest/getchannel.py
spaceexpanse/libxayagame
a68e0bc3ff775cdf6ab335c23e3c74e2e4903eba
[ "MIT" ]
null
null
null
ships/gametest/getchannel.py
spaceexpanse/libxayagame
a68e0bc3ff775cdf6ab335c23e3c74e2e4903eba
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (C) 2019-2022 The Xaya developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. from shipstest import ShipsTest """ Tests the getchannel RPC method of the (generic) channel GSP RPC server. """...
32.369231
73
0.639734
from shipstest import ShipsTest class GetChannelTest (ShipsTest): def run (self): self.generate (110) self.expectGameState ({ "gamestats": {}, "channels": {}, }) self.mainLogger.info ("Creating test channel...") addr = [self.newSigningAddress () for _ in range (2)] self.s...
true
true
f771d0e8d2483cb4922d2c92b90a216277aaa6e3
1,613
py
Python
robot_framework/position_feedback/px4.py
abarcis/robot-framework
a2cef7850784ae4c12b47fc7fb297f3772c2e2fe
[ "MIT" ]
null
null
null
robot_framework/position_feedback/px4.py
abarcis/robot-framework
a2cef7850784ae4c12b47fc7fb297f3772c2e2fe
[ "MIT" ]
null
null
null
robot_framework/position_feedback/px4.py
abarcis/robot-framework
a2cef7850784ae4c12b47fc7fb297f3772c2e2fe
[ "MIT" ]
null
null
null
#! /usr/bin/env python from pyquaternion import Quaternion import numpy as np from rclpy.node import Node from px4_msgs.msg import VehicleGlobalPosition class PX4PositionFeedback: def __init__(self, system_state, time_delta): self.node = Node('position_feedback') self.system_state = system_state...
32.918367
70
0.594544
from pyquaternion import Quaternion import numpy as np from rclpy.node import Node from px4_msgs.msg import VehicleGlobalPosition class PX4PositionFeedback: def __init__(self, system_state, time_delta): self.node = Node('position_feedback') self.system_state = system_state self.time_delt...
true
true
f771d132310dae91196d4a6ec6f70cede7175c67
2,058
py
Python
common/build/protobuf.py
cheersalam/webrtc
29e9cad470e6f8a95e2fc32bc111c8550c2ef0ca
[ "BSD-3-Clause" ]
null
null
null
common/build/protobuf.py
cheersalam/webrtc
29e9cad470e6f8a95e2fc32bc111c8550c2ef0ca
[ "BSD-3-Clause" ]
null
null
null
common/build/protobuf.py
cheersalam/webrtc
29e9cad470e6f8a95e2fc32bc111c8550c2ef0ca
[ "BSD-3-Clause" ]
null
null
null
import os import subprocess import shutil import urllib import distutils.dir_util from common import devtools from common.find import sevenz name = "protobuf" zipUrl = "https://github.com/protocolbuffers/protobuf/releases/download/v3.9.0/protobuf-cpp-3.9.0.tar.gz" patches = ["protobuf.patch"] def getRootP...
32.666667
158
0.646259
import os import subprocess import shutil import urllib import distutils.dir_util from common import devtools from common.find import sevenz name = "protobuf" zipUrl = "https://github.com/protocolbuffers/protobuf/releases/download/v3.9.0/protobuf-cpp-3.9.0.tar.gz" patches = ["protobuf.patch"] def getRootP...
false
true
f771d166d3851add93c307f2d636b315523f6dd1
5,037
bzl
Python
dotnet/defs.bzl
wbiker/rules_dotnet
e37a6053726e6b0a6a204489c70809739dae8f50
[ "Apache-2.0" ]
null
null
null
dotnet/defs.bzl
wbiker/rules_dotnet
e37a6053726e6b0a6a204489c70809739dae8f50
[ "Apache-2.0" ]
null
null
null
dotnet/defs.bzl
wbiker/rules_dotnet
e37a6053726e6b0a6a204489c70809739dae8f50
[ "Apache-2.0" ]
null
null
null
load( "@io_bazel_rules_dotnet//dotnet/private:context.bzl", _core_context_data = "core_context_data", _dotnet_context = "dotnet_context", _dotnet_context_data = "dotnet_context_data", _net_context_data = "net_context_data", ) load( "@io_bazel_rules_dotnet//dotnet/toolchain:toolchains.bzl", _...
34.033784
69
0.794521
load( "@io_bazel_rules_dotnet//dotnet/private:context.bzl", _core_context_data = "core_context_data", _dotnet_context = "dotnet_context", _dotnet_context_data = "dotnet_context_data", _net_context_data = "net_context_data", ) load( "@io_bazel_rules_dotnet//dotnet/toolchain:toolchains.bzl", _...
true
true
f771d33e4a76249913071920dedf0b09317dc790
1,557
py
Python
bin/evaluate.py
michel-ds/ingredient-phrase-tagger
1072fbad1d523ed5679c917f605a2933837c0ffc
[ "Apache-2.0" ]
null
null
null
bin/evaluate.py
michel-ds/ingredient-phrase-tagger
1072fbad1d523ed5679c917f605a2933837c0ffc
[ "Apache-2.0" ]
null
null
null
bin/evaluate.py
michel-ds/ingredient-phrase-tagger
1072fbad1d523ed5679c917f605a2933837c0ffc
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python import sys if len(sys.argv) < 2: sys.stderr.write('Usage: evaluate.py FILENAME') sys.exit(1) filename = sys.argv[1] # load CRF++ output for test data with open(filename, 'r') as file: sentences = file.read().split('\n\n') total_sentences = len(sentences) total_words, correct_words...
27.315789
75
0.609505
import sys if len(sys.argv) < 2: sys.stderr.write('Usage: evaluate.py FILENAME') sys.exit(1) filename = sys.argv[1] with open(filename, 'r') as file: sentences = file.read().split('\n\n') total_sentences = len(sentences) total_words, correct_words, correct_sentences = 0, 0, 0 for sentence in sentences...
true
true
f771d36e6703e3fc8f421f51288546a50f829d3a
58,217
py
Python
core/cameras.py
chiluf/visvis.dev
373846ea25044b7ca50f44c63dab4248e14deacd
[ "BSD-3-Clause" ]
null
null
null
core/cameras.py
chiluf/visvis.dev
373846ea25044b7ca50f44c63dab4248e14deacd
[ "BSD-3-Clause" ]
null
null
null
core/cameras.py
chiluf/visvis.dev
373846ea25044b7ca50f44c63dab4248e14deacd
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright (C) 2012, Almar Klein # # Visvis is distributed under the terms of the (new) BSD License. # The full license can be found in 'license.txt'. """ Module cameras A camera represents both the camera model and the interaction style. A lot of blood sweat and tears went into this module ...
33.190992
115
0.527612
import OpenGL.GL as gl import OpenGL.GLU as glu import math import visvis as vv from visvis.core.misc import Property from visvis.core.misc import Range from visvis.core import constants from visvis.pypoints import Quaternion, Point depthBits = [0] sind = lambda q: math.sin(q*math.pi/180) cosd = lambda q: math.co...
true
true
f771d39c4adaf0802384867b4eb612cbb8ef0516
92,290
py
Python
roundup/backends/back_anydbm.py
jerrykan/roundup
5d2447681f2cfc8bff651d95ae99f6f52ee5c073
[ "MIT" ]
1
2015-12-17T08:09:28.000Z
2015-12-17T08:09:28.000Z
roundup/backends/back_anydbm.py
jerrykan/roundup
5d2447681f2cfc8bff651d95ae99f6f52ee5c073
[ "MIT" ]
null
null
null
roundup/backends/back_anydbm.py
jerrykan/roundup
5d2447681f2cfc8bff651d95ae99f6f52ee5c073
[ "MIT" ]
1
2015-07-10T08:16:24.000Z
2015-07-10T08:16:24.000Z
# # Copyright (c) 2001 Bizar Software Pty Ltd (http://www.bizarsoftware.com.au/) # This module is free software, and you may redistribute it and/or modify # under the same terms as Python, so long as this copyright message and # disclaimer are retained in their original form. # # IN NO EVENT SHALL BIZAR SOFTWARE PTY LT...
38.631226
119
0.525799
__docformat__ = 'restructuredtext' import os, marshal, re, weakref, string, copy, time, shutil, logging from roundup.anypy.dbm_ import anydbm, whichdb from roundup.anypy.strings import b2s, bs2b, repr_export, eval_import, is_us from roundup import hyperdb, date, password, roundupdb, security, support from roundup.ba...
true
true
f771d3cf53b7904d0a6bdb61ad61aa16aee07272
2,828
py
Python
aiida/cmdline/utils/repository.py
iriberri/aiida_core
c4a1ec5dac92ee62c59d39ca580bde449f3abf73
[ "BSD-2-Clause" ]
null
null
null
aiida/cmdline/utils/repository.py
iriberri/aiida_core
c4a1ec5dac92ee62c59d39ca580bde449f3abf73
[ "BSD-2-Clause" ]
null
null
null
aiida/cmdline/utils/repository.py
iriberri/aiida_core
c4a1ec5dac92ee62c59d39ca580bde449f3abf73
[ "BSD-2-Clause" ]
1
2018-12-21T11:10:09.000Z
2018-12-21T11:10:09.000Z
# -*- coding: utf-8 -*- """Utility functions for command line commands operating on the repository.""" from aiida.cmdline.utils import echo def cat_repo_files(node, path): """ Given a Node and a relative path to a file in the Node repository directory, prints in output the content of the file. :param...
30.408602
89
0.592291
from aiida.cmdline.utils import echo def cat_repo_files(node, path): import os import sys fldr = node.folder is_dir = False parts = path.split(os.path.sep) for item in parts[:-1]: fldr = fldr.get_subfolder(item) if parts: if fldr.isdir(parts[-1]): fldr = f...
true
true
f771d40b728701f64a82859ee61a048c5a66e75f
16,659
py
Python
yt_dlp/downloader/external.py
evolution-ant/local-youtube-dl
e9be36e8cdc585c0e24a18c74d790b62af6e11a7
[ "Unlicense" ]
null
null
null
yt_dlp/downloader/external.py
evolution-ant/local-youtube-dl
e9be36e8cdc585c0e24a18c74d790b62af6e11a7
[ "Unlicense" ]
null
null
null
yt_dlp/downloader/external.py
evolution-ant/local-youtube-dl
e9be36e8cdc585c0e24a18c74d790b62af6e11a7
[ "Unlicense" ]
null
null
null
#!/usr/bin/env python from __future__ import unicode_literals import os.path import re import subprocess import sys import time import urllib.request import datetime from io import BytesIO import gzip from .common import FileDownloader from ..compat import ( compat_setenv, compat_str, ) from ..postprocessor....
39.197647
201
0.572783
from __future__ import unicode_literals import os.path import re import subprocess import sys import time import urllib.request import datetime from io import BytesIO import gzip from .common import FileDownloader from ..compat import ( compat_setenv, compat_str, ) from ..postprocessor.ffmpeg import FFmpegPo...
true
true
f771d42f82bcb19bb6724a08f9c2cc065dc2531e
31,167
py
Python
tests/components/utility_meter/test_sensor.py
Tediore/home-assistant
5ff5ed47446eea264b68182ea9ddebc476ebfcb0
[ "Apache-2.0" ]
1
2022-02-21T05:50:41.000Z
2022-02-21T05:50:41.000Z
tests/components/utility_meter/test_sensor.py
Tediore/home-assistant
5ff5ed47446eea264b68182ea9ddebc476ebfcb0
[ "Apache-2.0" ]
null
null
null
tests/components/utility_meter/test_sensor.py
Tediore/home-assistant
5ff5ed47446eea264b68182ea9ddebc476ebfcb0
[ "Apache-2.0" ]
1
2022-02-24T16:07:32.000Z
2022-02-24T16:07:32.000Z
"""The tests for the utility_meter sensor platform.""" from contextlib import contextmanager from datetime import timedelta from unittest.mock import patch import pytest from homeassistant.components.select.const import ( DOMAIN as SELECT_DOMAIN, SERVICE_SELECT_OPTION, ) from homeassistant.components.sensor i...
31.323618
89
0.601117
from contextlib import contextmanager from datetime import timedelta from unittest.mock import patch import pytest from homeassistant.components.select.const import ( DOMAIN as SELECT_DOMAIN, SERVICE_SELECT_OPTION, ) from homeassistant.components.sensor import ( ATTR_STATE_CLASS, SensorDeviceClass, ...
true
true
f771d433e2f631f3b2f0bc0b3150ebe17826c4a7
10,344
py
Python
native_client_sdk/src/tools/httpd.py
nagineni/chromium-crosswalk
5725642f1c67d0f97e8613ec1c3e8107ab53fdf8
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
231
2015-01-08T09:04:44.000Z
2021-12-30T03:03:10.000Z
native_client_sdk/src/tools/httpd.py
j4ckfrost/android_external_chromium_org
a1a3dad8b08d1fcf6b6b36c267158ed63217c780
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
1
2017-02-14T21:55:58.000Z
2017-02-14T21:55:58.000Z
native_client_sdk/src/tools/httpd.py
j4ckfrost/android_external_chromium_org
a1a3dad8b08d1fcf6b6b36c267158ed63217c780
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
268
2015-01-21T05:53:28.000Z
2022-03-25T22:09:01.000Z
#!/usr/bin/env python # Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import BaseHTTPServer import imp import logging import multiprocessing import optparse import os import SimpleHTTPServer # pylint:...
32.426332
80
0.682038
import BaseHTTPServer import imp import logging import multiprocessing import optparse import os import SimpleHTTPServer import socket import sys import time import urlparse if sys.version_info < (2, 6, 0): sys.stderr.write("python 2.6 or later is required run this script\n") sys.exit(1) SCRIPT_DIR = os.path.d...
false
true
f771d4dabe98bf364ffc451446d2ab47580068cf
2,986
py
Python
src/sphinx_conda/model.py
jamesp/sphinx-conda
3ab091af4aabb12f151a40d1c93dd3eb16ca2785
[ "MIT" ]
null
null
null
src/sphinx_conda/model.py
jamesp/sphinx-conda
3ab091af4aabb12f151a40d1c93dd3eb16ca2785
[ "MIT" ]
null
null
null
src/sphinx_conda/model.py
jamesp/sphinx-conda
3ab091af4aabb12f151a40d1c93dd3eb16ca2785
[ "MIT" ]
null
null
null
from functools import total_ordering from pathlib import Path from typing import Any, Dict, Generator, List, Optional, Tuple, Union import yaml from pydantic import BaseModel from .util import split @total_ordering class CondaPackage(BaseModel): name: str version: Optional[str] build: Optional[str] ...
32.456522
85
0.605157
from functools import total_ordering from pathlib import Path from typing import Any, Dict, Generator, List, Optional, Tuple, Union import yaml from pydantic import BaseModel from .util import split @total_ordering class CondaPackage(BaseModel): name: str version: Optional[str] build: Optional[str] ...
true
true
f771d4e1b9c63640a97dc7e2883a0d18e0f79f2c
36,739
py
Python
data_conversion_subsystem/test/data_converter/test_data_converter.py
diego-hermida/ClimateChangeApp
576d49ec5b76f709cc86874ffb03f4a38dbbbbfd
[ "MIT" ]
2
2018-07-01T20:36:46.000Z
2019-11-01T22:47:06.000Z
data_conversion_subsystem/test/data_converter/test_data_converter.py
diego-hermida/ClimateChangeApp
576d49ec5b76f709cc86874ffb03f4a38dbbbbfd
[ "MIT" ]
1
2021-06-10T20:28:53.000Z
2021-06-10T20:28:53.000Z
data_conversion_subsystem/test/data_converter/test_data_converter.py
diego-hermida/ClimateChangeApp
576d49ec5b76f709cc86874ffb03f4a38dbbbbfd
[ "MIT" ]
null
null
null
import datetime from copy import deepcopy from os import environ from unittest import TestCase, mock from unittest.mock import Mock from pytz import UTC from requests import Timeout import data_conversion_subsystem.data_converter.data_converter as data_converter from data_conversion_subsystem.config.config import DCS...
57.584639
122
0.721767
import datetime from copy import deepcopy from os import environ from unittest import TestCase, mock from unittest.mock import Mock from pytz import UTC from requests import Timeout import data_conversion_subsystem.data_converter.data_converter as data_converter from data_conversion_subsystem.config.config import DCS...
true
true
f771d53284612c846d483de1a895fe6c3c2b918d
705
py
Python
examples/pylab_examples/to_numeric.py
mattfoster/matplotlib
0b47697b19b77226c633ec6a3d74a2199a153315
[ "PSF-2.0", "BSD-3-Clause" ]
1
2016-05-08T18:33:12.000Z
2016-05-08T18:33:12.000Z
examples/pylab_examples/to_numeric.py
mattfoster/matplotlib
0b47697b19b77226c633ec6a3d74a2199a153315
[ "PSF-2.0", "BSD-3-Clause" ]
null
null
null
examples/pylab_examples/to_numeric.py
mattfoster/matplotlib
0b47697b19b77226c633ec6a3d74a2199a153315
[ "PSF-2.0", "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python """ Use backend agg to access the figure canvas as an RGB string and then convert it to an array and pass the string it to PIL for rendering """ from pylab import * from matplotlib.backends.backend_agg import FigureCanvasAgg try: import Image except ImportError, exc: raise SystemExit("PIL...
20.735294
69
0.720567
""" Use backend agg to access the figure canvas as an RGB string and then convert it to an array and pass the string it to PIL for rendering """ from pylab import * from matplotlib.backends.backend_agg import FigureCanvasAgg try: import Image except ImportError, exc: raise SystemExit("PIL must be installed to ...
false
true
f771d59ad612f60ebb45c9682652da798aa35824
13,170
py
Python
tests/api/test_validator.py
felliott/SHARE
8fd60ff4749349c9b867f6188650d71f4f0a1a56
[ "Apache-2.0" ]
null
null
null
tests/api/test_validator.py
felliott/SHARE
8fd60ff4749349c9b867f6188650d71f4f0a1a56
[ "Apache-2.0" ]
null
null
null
tests/api/test_validator.py
felliott/SHARE
8fd60ff4749349c9b867f6188650d71f4f0a1a56
[ "Apache-2.0" ]
null
null
null
import json import pytest import requests from unittest import mock from tests import factories invalid_work = { 'data': { 'type': 'NormalizedData', 'attributes': { 'data': { '@graph': [ { '@type': 'InvalidWorkType', ...
34.296875
110
0.404632
import json import pytest import requests from unittest import mock from tests import factories invalid_work = { 'data': { 'type': 'NormalizedData', 'attributes': { 'data': { '@graph': [ { '@type': 'InvalidWorkType', ...
true
true
f771d5b87524a94e4f59a16f10c1d97643ba11ec
875
py
Python
language-modeling/lstm/_checkpoint_util.py
AaratiAkkapeddi/nnabla-examples
db9e5ad850303c158773aeb275e5c3821b4a3935
[ "Apache-2.0" ]
null
null
null
language-modeling/lstm/_checkpoint_util.py
AaratiAkkapeddi/nnabla-examples
db9e5ad850303c158773aeb275e5c3821b4a3935
[ "Apache-2.0" ]
null
null
null
language-modeling/lstm/_checkpoint_util.py
AaratiAkkapeddi/nnabla-examples
db9e5ad850303c158773aeb275e5c3821b4a3935
[ "Apache-2.0" ]
null
null
null
# Copyright 2020,2021 Sony Corporation. # Copyright 2021 Sony Group Corporation. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless...
33.653846
74
0.770286
from __future__ import absolute_import import os import sys sys.path.append(os.path.join( os.path.dirname(__file__), '../../utils/')) from neu.checkpoint_util import save_checkpoint, load_checkpoint
true
true
f771d78acf1b8c3666fcbd29949430d271305c4f
3,175
py
Python
apps/odoo/lib/odoo-10.0.post20170615-py2.7.egg/odoo/addons/stock_calendar/__manifest__.py
gtfarng/Odoo_migrade
9cc28fae4c379e407645248a29d22139925eafe7
[ "Apache-2.0" ]
1
2019-12-19T01:53:13.000Z
2019-12-19T01:53:13.000Z
apps/odoo/lib/odoo-10.0.post20170615-py2.7.egg/odoo/addons/stock_calendar/__manifest__.py
gtfarng/Odoo_migrade
9cc28fae4c379e407645248a29d22139925eafe7
[ "Apache-2.0" ]
null
null
null
apps/odoo/lib/odoo-10.0.post20170615-py2.7.egg/odoo/addons/stock_calendar/__manifest__.py
gtfarng/Odoo_migrade
9cc28fae4c379e407645248a29d22139925eafe7
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. { 'name': 'Calendars on Orderpoints', 'version': '1.0', 'summary': 'Calendars ', 'description': """ The stock_calendar module handles minimum stock rules (=orderpoints / reordering rules) differen...
53.813559
144
0.699213
{ 'name': 'Calendars on Orderpoints', 'version': '1.0', 'summary': 'Calendars ', 'description': """ The stock_calendar module handles minimum stock rules (=orderpoints / reordering rules) differently by the possibility to take into account the purchase and delivery calendars. N...
true
true
f771d9e23d1020c910f82d82c1e92eec00c1cafb
154
py
Python
mercury/config/__init__.py
greenlsi/mercury_mso_framework
8b9639e5cb4b2c526a65861c93a9fe9db2460ea4
[ "Apache-2.0" ]
1
2020-07-21T11:22:39.000Z
2020-07-21T11:22:39.000Z
mercury/config/__init__.py
greenlsi/mercury_mso_framework
8b9639e5cb4b2c526a65861c93a9fe9db2460ea4
[ "Apache-2.0" ]
2
2021-08-25T16:09:58.000Z
2022-02-10T02:21:03.000Z
mercury/config/__init__.py
greenlsi/mercury_mso_framework
8b9639e5cb4b2c526a65861c93a9fe9db2460ea4
[ "Apache-2.0" ]
1
2021-02-24T15:54:09.000Z
2021-02-24T15:54:09.000Z
from .network import TransceiverConfig, LinkConfig from .edcs import ResourceManagerConfig from .smart_grid import PowerSourceConfig, EnergyStorageConfig
38.5
62
0.876623
from .network import TransceiverConfig, LinkConfig from .edcs import ResourceManagerConfig from .smart_grid import PowerSourceConfig, EnergyStorageConfig
true
true
f771daafb9328be5e61af196d427c025f21b5cea
2,098
py
Python
src/chat/consumers.py
RafaPinzon93/django-chat
eaf1b9425058314c623ad3e5f2ce9928c7b7ea8b
[ "MIT" ]
null
null
null
src/chat/consumers.py
RafaPinzon93/django-chat
eaf1b9425058314c623ad3e5f2ce9928c7b7ea8b
[ "MIT" ]
3
2020-02-12T00:59:18.000Z
2021-06-10T21:43:24.000Z
src/chat/consumers.py
RafaPinzon93/django-chat
eaf1b9425058314c623ad3e5f2ce9928c7b7ea8b
[ "MIT" ]
null
null
null
import json from django.contrib.auth import get_user_model from channels.consumer import AsyncConsumer from channels.db import database_sync_to_async from .models import Thread, ChatMessage class ChatConsumer(AsyncConsumer): async def websocket_connect(self, event): print("connected", event) oth...
30.852941
86
0.594376
import json from django.contrib.auth import get_user_model from channels.consumer import AsyncConsumer from channels.db import database_sync_to_async from .models import Thread, ChatMessage class ChatConsumer(AsyncConsumer): async def websocket_connect(self, event): print("connected", event) oth...
true
true
f771db564f51acde91a662d57ce6bf7b068e5908
19,832
py
Python
autograph/play/maze_nn_aut_adv.py
bb912/MATS-DRS
6e1ae9ba3b865e321d6a2d100d29693b776e1d36
[ "MIT" ]
null
null
null
autograph/play/maze_nn_aut_adv.py
bb912/MATS-DRS
6e1ae9ba3b865e321d6a2d100d29693b776e1d36
[ "MIT" ]
null
null
null
autograph/play/maze_nn_aut_adv.py
bb912/MATS-DRS
6e1ae9ba3b865e321d6a2d100d29693b776e1d36
[ "MIT" ]
null
null
null
import math import os import signal import sys from typing import Callable, Any, Tuple, List, Union, Optional import ptan import torch import torch.nn.functional as F from tensorboardX import SummaryWriter from torch import multiprocessing from torch.optim import Adam, SGD import autograph.lib.envs.mazeenv from autog...
37.138577
120
0.660649
import math import os import signal import sys from typing import Callable, Any, Tuple, List, Union, Optional import ptan import torch import torch.nn.functional as F from tensorboardX import SummaryWriter from torch import multiprocessing from torch.optim import Adam, SGD import autograph.lib.envs.mazeenv from autog...
true
true
f771dc00cafb46a256aa85862b1fe02103b86c77
4,776
py
Python
src/algo/handle_simple.py
terra-dashboard/staketaxcsv
5793105488bf799c61aee64a45f44e9ae8fef397
[ "MIT" ]
null
null
null
src/algo/handle_simple.py
terra-dashboard/staketaxcsv
5793105488bf799c61aee64a45f44e9ae8fef397
[ "MIT" ]
null
null
null
src/algo/handle_simple.py
terra-dashboard/staketaxcsv
5793105488bf799c61aee64a45f44e9ae8fef397
[ "MIT" ]
null
null
null
from algo import constants as co from algo.asset import Algo from algo.util_algo import get_transfer_asset from common.ExporterTypes import TX_TYPE_LP_DEPOSIT, TX_TYPE_LP_WITHDRAW from common.make_tx import _make_tx_exchange, make_reward_tx, make_swap_tx, make_unknown_tx def handle_unknown(exporter, txinfo): row ...
33.87234
116
0.675042
from algo import constants as co from algo.asset import Algo from algo.util_algo import get_transfer_asset from common.ExporterTypes import TX_TYPE_LP_DEPOSIT, TX_TYPE_LP_WITHDRAW from common.make_tx import _make_tx_exchange, make_reward_tx, make_swap_tx, make_unknown_tx def handle_unknown(exporter, txinfo): row ...
true
true
f771dc8bd34b8d38765cf0eb6f6ce848df8673f3
490
py
Python
examples/idioms/programs/128.2085-breadth-first-traversing-of-a-tree.py
laowantong/paroxython
4626798a60eeaa765dbfab9e63e04030c9fcb1d0
[ "MIT" ]
31
2020-05-02T13:34:26.000Z
2021-06-06T17:25:52.000Z
examples/idioms/programs/128.2085-breadth-first-traversing-of-a-tree.py
laowantong/paroxython
4626798a60eeaa765dbfab9e63e04030c9fcb1d0
[ "MIT" ]
108
2019-11-18T19:41:52.000Z
2022-03-18T13:58:17.000Z
examples/idioms/programs/128.2085-breadth-first-traversing-of-a-tree.py
laowantong/paroxython
4626798a60eeaa765dbfab9e63e04030c9fcb1d0
[ "MIT" ]
4
2020-05-19T08:57:44.000Z
2020-09-21T08:53:46.000Z
"""Breadth-first traversing of a tree. Call a function _f on every node of a tree, in breadth-first prefix order Source: programming-idioms.org """ # Implementation author: cpoulet_42 # Created on 2017-08-09T09:52:02.728772Z # Last modified on 2017-08-09T22:27:55.685981Z # Version 2 def BFS(f, root): Q = [root...
21.304348
73
0.608163
def BFS(f, root): Q = [root] while Q: n = Q.pop(0) f(n) for child in n: if not n.discovered: n.discovered = True Q.append(n)
true
true
f771dcdec8013d366eee3825846c367c20d308ab
30,404
py
Python
lib/tests/streamlit/scriptrunner/script_runner_test.py
sourcery-ai-bot/streamlit
cbfa69c8ec310a839148cfa4bac5697e6f392a79
[ "Apache-2.0" ]
null
null
null
lib/tests/streamlit/scriptrunner/script_runner_test.py
sourcery-ai-bot/streamlit
cbfa69c8ec310a839148cfa4bac5697e6f392a79
[ "Apache-2.0" ]
null
null
null
lib/tests/streamlit/scriptrunner/script_runner_test.py
sourcery-ai-bot/streamlit
cbfa69c8ec310a839148cfa4bac5697e6f392a79
[ "Apache-2.0" ]
null
null
null
# Copyright 2018-2022 Streamlit Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wr...
37.535802
93
0.646658
import os import sys import time from typing import List, Any from unittest.mock import MagicMock, patch import pytest from parameterized import parameterized from tornado.testing import AsyncTestCase from streamlit.legacy_caching import caching from streamlit.error_util import _GENERIC_UNCAUGHT_EXCEPTION_TEXT from...
true
true
f771ddc0189b6b9a7a9934f7529f442b097fe014
17,127
py
Python
_Framework/DeviceComponent.py
isfopo/MacroPushScript
46c440aa3f6325d8767e88252c5520d76a9fa634
[ "MIT" ]
null
null
null
_Framework/DeviceComponent.py
isfopo/MacroPushScript
46c440aa3f6325d8767e88252c5520d76a9fa634
[ "MIT" ]
null
null
null
_Framework/DeviceComponent.py
isfopo/MacroPushScript
46c440aa3f6325d8767e88252c5520d76a9fa634
[ "MIT" ]
null
null
null
#Embedded file name: /Users/versonator/Jenkins/live/output/Live/mac_64_static/Release/python-bundle/MIDI Remote Scripts/_Framework/DeviceComponent.py from __future__ import absolute_import, print_function, unicode_literals from builtins import zip from builtins import str from builtins import range import Live from _Ge...
42.8175
200
0.667134
from __future__ import absolute_import, print_function, unicode_literals from builtins import zip from builtins import str from builtins import range import Live from _Generic.Devices import device_parameters_to_map, number_of_parameter_banks, parameter_banks, parameter_bank_names, best_of_parameter_bank from .ButtonEl...
true
true
f771dedd977d91621e6c17a6c16195fb9ee30f4f
6,323
py
Python
docker/auth/auth.py
caputomarcos/docker-py
59f569a2469434488f71442195ba61ce3eb63a7b
[ "Apache-2.0" ]
null
null
null
docker/auth/auth.py
caputomarcos/docker-py
59f569a2469434488f71442195ba61ce3eb63a7b
[ "Apache-2.0" ]
null
null
null
docker/auth/auth.py
caputomarcos/docker-py
59f569a2469434488f71442195ba61ce3eb63a7b
[ "Apache-2.0" ]
null
null
null
# Copyright 2013 dotCloud inc. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agreed t...
30.253589
79
0.615689
import base64 import json import logging import os import six from .. import errors INDEX_NAME = 'index.docker.io' INDEX_URL = 'https://{0}/v1/'.format(INDEX_NAME) DOCKER_CONFIG_FILENAME = os.path.join('.docker', 'config.json') LEGACY_DOCKER_CONFIG_FILENAME = '.dockercfg' log = logging.getLogger(__name__) def...
true
true
f771e08c498f83509c00685be3da9d1f82158a00
205
py
Python
parser/src/test/test-data/math_sqrt.py
luciansmith/sedml-script
d891645d0b3f89ff190fc7e719659c8e229c07da
[ "MIT" ]
null
null
null
parser/src/test/test-data/math_sqrt.py
luciansmith/sedml-script
d891645d0b3f89ff190fc7e719659c8e229c07da
[ "MIT" ]
null
null
null
parser/src/test/test-data/math_sqrt.py
luciansmith/sedml-script
d891645d0b3f89ff190fc7e719659c8e229c07da
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created by libsedmlscript v0.0.1 """ from sed_roadrunner import model, task, plot from math import sqrt #---------------------------------------------- sqrt(16)
15.769231
48
0.478049
from sed_roadrunner import model, task, plot from math import sqrt sqrt(16)
true
true
f771e11095532f5b6f76b6fde769908758dfc70a
2,192
py
Python
day08.py
drewbrew/advent-of-code-2015
885ec0c2f25c4ec2425c3d05dd0c9ccc5b0890df
[ "Apache-2.0" ]
null
null
null
day08.py
drewbrew/advent-of-code-2015
885ec0c2f25c4ec2425c3d05dd0c9ccc5b0890df
[ "Apache-2.0" ]
null
null
null
day08.py
drewbrew/advent-of-code-2015
885ec0c2f25c4ec2425c3d05dd0c9ccc5b0890df
[ "Apache-2.0" ]
null
null
null
from queue import Queue from typing import Iterable TEST_INPUTS = { '""': (2, 0, 6), '"abc"': (5, 3, 9), '"aaa\\"aaa"': (10, 7, 16), '"\\x27"': (6, 1, 11), } def unescaped_str_len(string: str) -> int: queue = Queue() for char in string: queue.put(char) length = 0 while not que...
28.467532
86
0.568887
from queue import Queue from typing import Iterable TEST_INPUTS = { '""': (2, 0, 6), '"abc"': (5, 3, 9), '"aaa\\"aaa"': (10, 7, 16), '"\\x27"': (6, 1, 11), } def unescaped_str_len(string: str) -> int: queue = Queue() for char in string: queue.put(char) length = 0 while not que...
true
true
f771e16b3526c6811f6c422b3a26e381511cbaa7
65,686
py
Python
salt/states/boto_vpc.py
guoxiaod/salt
2cd6c03b40932be137e6e8a672967b59025a2d34
[ "Apache-2.0" ]
null
null
null
salt/states/boto_vpc.py
guoxiaod/salt
2cd6c03b40932be137e6e8a672967b59025a2d34
[ "Apache-2.0" ]
1
2019-08-18T07:03:30.000Z
2019-08-18T07:03:30.000Z
salt/states/boto_vpc.py
guoxiaod/salt
2cd6c03b40932be137e6e8a672967b59025a2d34
[ "Apache-2.0" ]
2
2020-11-04T06:24:32.000Z
2020-11-06T11:00:57.000Z
# -*- coding: utf-8 -*- ''' Manage VPCs ================= .. versionadded:: 2015.8.0 :depends: - boto >= 2.8.0 - boto3 >= 1.2.6 Create and destroy VPCs. Be aware that this interacts with Amazon's services, and so may incur charges. This module accepts explicit vpc credentials but can also utilize IAM roles assigne...
36.071389
149
0.538775
from __future__ import absolute_import, print_function, unicode_literals import logging from salt.ext import six import salt.utils.dictupdate as dictupdate __virtualname__ = 'boto_vpc' log = logging.getLogger(__name__) def __virtual__(): boto_version = '2.8.0' boto3_version = '1.2.6' if 'boto_vpc.exis...
true
true
f771e1b80cdca589074c1e54b6faa47e2dfb466f
3,646
py
Python
airflow/providers/amazon/aws/operators/glue_crawler.py
MoBagel/airflow
0905e386f17e34d96f6ee575404c62b13242c75d
[ "Apache-2.0" ]
null
null
null
airflow/providers/amazon/aws/operators/glue_crawler.py
MoBagel/airflow
0905e386f17e34d96f6ee575404c62b13242c75d
[ "Apache-2.0" ]
null
null
null
airflow/providers/amazon/aws/operators/glue_crawler.py
MoBagel/airflow
0905e386f17e34d96f6ee575404c62b13242c75d
[ "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...
36.09901
110
0.702414
import warnings from typing import TYPE_CHECKING if TYPE_CHECKING: from airflow.utils.context import Context from airflow.compat.functools import cached_property from airflow.models import BaseOperator from airflow.providers.amazon.aws.hooks.glue_crawler import GlueCrawlerHook class GlueCrawlerOperator(BaseOper...
true
true
f771e1d635fa47e6b5c2adc1aaf32bd24d8e34dc
4,843
py
Python
openaerostruct/aerodynamics/panel_forces.py
EricUrbineer/OpenAeroStruct
26c37a0e86074517680405687824e27b3b2caaec
[ "Apache-2.0" ]
4
2020-09-15T23:24:15.000Z
2021-01-11T19:59:39.000Z
openaerostruct/aerodynamics/panel_forces.py
EricUrbineer/OpenAeroStruct
26c37a0e86074517680405687824e27b3b2caaec
[ "Apache-2.0" ]
null
null
null
openaerostruct/aerodynamics/panel_forces.py
EricUrbineer/OpenAeroStruct
26c37a0e86074517680405687824e27b3b2caaec
[ "Apache-2.0" ]
2
2020-08-25T16:38:14.000Z
2020-12-03T09:49:45.000Z
from __future__ import print_function import numpy as np from openmdao.api import ExplicitComponent from openaerostruct.utils.vector_algebra import compute_cross, compute_cross_deriv1, compute_cross_deriv2 class PanelForces(ExplicitComponent): """ Compute the panel forces acting on all surfaces in the syste...
40.358333
111
0.629568
from __future__ import print_function import numpy as np from openmdao.api import ExplicitComponent from openaerostruct.utils.vector_algebra import compute_cross, compute_cross_deriv1, compute_cross_deriv2 class PanelForces(ExplicitComponent): def initialize(self): self.options.declare('surfaces', type...
true
true
f771e2161e75056f654ee7f33e3979c9bfbbfedf
2,695
py
Python
pyostie/__init__.py
libraryopen/Pyostie
8fa7df10129f0f1fe82c6cafbcdbc8ed4119bd3a
[ "MIT" ]
null
null
null
pyostie/__init__.py
libraryopen/Pyostie
8fa7df10129f0f1fe82c6cafbcdbc8ed4119bd3a
[ "MIT" ]
null
null
null
pyostie/__init__.py
libraryopen/Pyostie
8fa7df10129f0f1fe82c6cafbcdbc8ed4119bd3a
[ "MIT" ]
null
null
null
from pyostie.parsers import * from pyostie.insights_ext import * from pyostie.convert import * from pyostie.utils import * class extract: def __init__(self, filename, insights=False, tess_path=None, extension=None): """ :param filename: :param insights: :param tess_path: :...
29.944444
81
0.502041
from pyostie.parsers import * from pyostie.insights_ext import * from pyostie.convert import * from pyostie.utils import * class extract: def __init__(self, filename, insights=False, tess_path=None, extension=None): self.file = filename self.insights = insights self.path = tess_path ...
true
true
f771e2c9de96f0f9999d984e4ab6f836e62ca719
11,217
py
Python
groupdocs_signature_cloud/models/pdf_text_annotation_appearance.py
groupdocs-signature-cloud/groupdocs-signature-cloud-python
2b7f03b3d70f191dc1292f6221ed9301811681cf
[ "MIT" ]
null
null
null
groupdocs_signature_cloud/models/pdf_text_annotation_appearance.py
groupdocs-signature-cloud/groupdocs-signature-cloud-python
2b7f03b3d70f191dc1292f6221ed9301811681cf
[ "MIT" ]
null
null
null
groupdocs_signature_cloud/models/pdf_text_annotation_appearance.py
groupdocs-signature-cloud/groupdocs-signature-cloud-python
2b7f03b3d70f191dc1292f6221ed9301811681cf
[ "MIT" ]
1
2021-02-03T00:18:17.000Z
2021-02-03T00:18:17.000Z
# coding: utf-8 # ----------------------------------------------------------------------------------- # <copyright company="Aspose Pty Ltd" file="PdfTextAnnotationAppearance.py"> # Copyright (c) 2003-2021 Aspose Pty Ltd # </copyright> # <summary> # Permission is hereby granted, free of charge, to any person obtain...
31.686441
195
0.594811
import pprint import re import six from groupdocs_signature_cloud.models import SignatureAppearance class PdfTextAnnotationAppearance(SignatureAppearance): swagger_types = { 'border': 'BorderLine', 'border_effect': 'str', 'border_effect_intensity': 'int', 'contents': 'str', ...
true
true
f771e2d7477dd53329165622fab257a8b82be854
2,316
py
Python
libs/common/bitcoin/networks.py
hodlwave/f469-disco
f83f3fe096d02f76452eb48ba8a955d098591531
[ "MIT" ]
3
2020-12-06T06:14:14.000Z
2022-01-18T19:03:35.000Z
libs/common/bitcoin/networks.py
hodlwave/f469-disco
f83f3fe096d02f76452eb48ba8a955d098591531
[ "MIT" ]
null
null
null
libs/common/bitcoin/networks.py
hodlwave/f469-disco
f83f3fe096d02f76452eb48ba8a955d098591531
[ "MIT" ]
null
null
null
NETWORKS = { "main": { "name": "Mainnet", "wif": b'\x80', "p2pkh": b'\x00', "p2sh": b'\x05', "bech32": "bc", "xprv": b'\x04\x88\xad\xe4', "xpub": b'\x04\x88\xb2\x1e', "yprv": b'\x04\x9d\x78\x78', "zprv": b'\x04\xb2\x43\x0c', ...
31.297297
52
0.402418
NETWORKS = { "main": { "name": "Mainnet", "wif": b'\x80', "p2pkh": b'\x00', "p2sh": b'\x05', "bech32": "bc", "xprv": b'\x04\x88\xad\xe4', "xpub": b'\x04\x88\xb2\x1e', "yprv": b'\x04\x9d\x78\x78', "zprv": b'\x04\xb2\x43\x0c', ...
true
true
f771e2d8064df3b7b0ab988783e1a2ca1ce60100
724
py
Python
tools/remove_weights.py
jdwapman/gunrock
8a6173320ef58d949a550990f6b00d491dcbd227
[ "Apache-2.0" ]
790
2015-01-07T04:22:29.000Z
2022-03-30T01:12:25.000Z
tools/remove_weights.py
jdwapman/gunrock
8a6173320ef58d949a550990f6b00d491dcbd227
[ "Apache-2.0" ]
779
2015-02-05T21:47:15.000Z
2022-03-28T22:28:37.000Z
tools/remove_weights.py
jdwapman/gunrock
8a6173320ef58d949a550990f6b00d491dcbd227
[ "Apache-2.0" ]
228
2015-01-08T13:59:35.000Z
2022-03-30T01:12:29.000Z
#!usr/bin/python """ simple python script to remove weight values associated with .mtx graph """ import random import fileinput import sys ### check command line args if len(sys.argv) != 2: print 'Usage: python remove_weights.py file_name.mtx' sys.exit() ### output matrix-market format graph ograph = open(s...
24.133333
71
0.618785
""" simple python script to remove weight values associated with .mtx graph """ import random import fileinput import sys if len(sys.argv) != 2: print 'Usage: python remove_weights.py file_name.mtx' sys.exit() ograph = open(sys.argv[1].split('.')[0] + '.no.weight.mtx', 'w') is_edge = False for line in filei...
false
true
f771e3990b86a631176ab35718ef6dbd0a4cabf3
1,187
py
Python
glue/viewers/common/utils.py
tiagopereira/glue
85bf7ce2d252d7bc405e8160b56fc83d46b9cbe4
[ "BSD-3-Clause" ]
1
2019-12-17T07:58:35.000Z
2019-12-17T07:58:35.000Z
glue/viewers/common/utils.py
scalet98/glue
ff949ad52e205c20561f48c05f870b2abb39e0b0
[ "BSD-3-Clause" ]
null
null
null
glue/viewers/common/utils.py
scalet98/glue
ff949ad52e205c20561f48c05f870b2abb39e0b0
[ "BSD-3-Clause" ]
1
2019-08-04T14:10:12.000Z
2019-08-04T14:10:12.000Z
from __future__ import absolute_import, division, print_function __all__ = ['get_viewer_tools'] def get_viewer_tools(cls, tools=None, subtools=None): """ Given a viewer class, find all the tools and subtools to include in the viewer. Parameters ---------- cls : type The viewer class ...
30.435897
75
0.629318
from __future__ import absolute_import, division, print_function __all__ = ['get_viewer_tools'] def get_viewer_tools(cls, tools=None, subtools=None): if not hasattr(cls, 'inherit_tools'): return if tools is None: tools = [] if subtools is None: subtools = {} if cls.inherit_too...
true
true
f771e413e7532254bc22390c6cde65f4a908e7e4
59,619
py
Python
salt/transport/tcp.py
guoxiaod/salt
2cd6c03b40932be137e6e8a672967b59025a2d34
[ "Apache-2.0" ]
null
null
null
salt/transport/tcp.py
guoxiaod/salt
2cd6c03b40932be137e6e8a672967b59025a2d34
[ "Apache-2.0" ]
null
null
null
salt/transport/tcp.py
guoxiaod/salt
2cd6c03b40932be137e6e8a672967b59025a2d34
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- ''' TCP transport classes Wire protocol: "len(payload) msgpack({'head': SOMEHEADER, 'body': SOMEBODY})" ''' # Import Python Libs from __future__ import absolute_import, print_function, unicode_literals import errno import logging import msgpack import socket import os import weakref import ti...
40.310345
115
0.566833
''' TCP transport classes Wire protocol: "len(payload) msgpack({'head': SOMEHEADER, 'body': SOMEBODY})" ''' from __future__ import absolute_import, print_function, unicode_literals import errno import logging import msgpack import socket import os import weakref import time import traceback import salt.crypt import...
false
true
f771e43e42bb7cd625cf03cdf6870d190c76dc1e
7,409
py
Python
components/tools.py
asappresearch/abcd
6199ca87f81260d561075b9261244b12132cc298
[ "MIT" ]
39
2021-04-04T19:23:17.000Z
2022-03-14T23:40:02.000Z
components/tools.py
asappresearch/abcd
6199ca87f81260d561075b9261244b12132cc298
[ "MIT" ]
3
2021-07-27T06:07:29.000Z
2022-01-04T20:05:21.000Z
components/tools.py
asappresearch/abcd
6199ca87f81260d561075b9261244b12132cc298
[ "MIT" ]
9
2021-06-17T16:12:42.000Z
2022-02-25T22:23:48.000Z
import os, sys, pdb import logging import numpy as np from tensorboardX import SummaryWriter from torch.optim.optimizer import Optimizer, required from transformers import AdamW, get_linear_schedule_with_warmup class ExperienceLogger(object): def __init__(self, args, checkpoint_dir): self.args = args...
42.337143
175
0.558105
import os, sys, pdb import logging import numpy as np from tensorboardX import SummaryWriter from torch.optim.optimizer import Optimizer, required from transformers import AdamW, get_linear_schedule_with_warmup class ExperienceLogger(object): def __init__(self, args, checkpoint_dir): self.args = args...
true
true
f771e7eeb6d562dbb7089fc07866c4ed8b8e8e09
6,957
py
Python
evaluate.py
MiseryForMe/MDC
470b2db76a71d7e4260de7e39e6cf9a61c80ca2b
[ "Apache-2.0" ]
null
null
null
evaluate.py
MiseryForMe/MDC
470b2db76a71d7e4260de7e39e6cf9a61c80ca2b
[ "Apache-2.0" ]
null
null
null
evaluate.py
MiseryForMe/MDC
470b2db76a71d7e4260de7e39e6cf9a61c80ca2b
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python # -*- encoding: utf-8 -*- import torch import torch.nn.functional as F from torch.utils.data import DataLoader import numpy as np import cv2 from PIL import Image from tqdm import tqdm import logging import importlib import argparse import os.path as osp import sys import math from lib.model impor...
31.622727
88
0.562599
import torch import torch.nn.functional as F from torch.utils.data import DataLoader import numpy as np import cv2 from PIL import Image from tqdm import tqdm import logging import importlib import argparse import os.path as osp import sys import math from lib.model import DeepLabLargeFOV from lib.pascal_voc import...
true
true
f771e8dbed600f56fecd9ab3832cd2ad7a50dc01
140
py
Python
paths.py
princeton-vl/selfstudy
d18ab26c11843557ee75aaccf6ccb63de85b397c
[ "BSD-3-Clause" ]
55
2020-04-01T15:07:43.000Z
2022-02-21T14:27:54.000Z
paths.py
princeton-vl/selfstudy
d18ab26c11843557ee75aaccf6ccb63de85b397c
[ "BSD-3-Clause" ]
null
null
null
paths.py
princeton-vl/selfstudy
d18ab26c11843557ee75aaccf6ccb63de85b397c
[ "BSD-3-Clause" ]
2
2020-04-27T12:59:34.000Z
2021-03-27T22:07:13.000Z
import os CURR_DIR = os.path.dirname(__file__) CONFIG_DIR = f'{CURR_DIR}/config' EXP_DIR = f'{CURR_DIR}/exp' DATA_DIR = f'{CURR_DIR}/data'
20
36
0.728571
import os CURR_DIR = os.path.dirname(__file__) CONFIG_DIR = f'{CURR_DIR}/config' EXP_DIR = f'{CURR_DIR}/exp' DATA_DIR = f'{CURR_DIR}/data'
true
true
f771e8f3912aa223e6fb0e266e3a50c8a4370ec2
18,588
py
Python
django/contrib/admindocs/views.py
danhayden/django
49b470b9187b6be60e573fed08c8f4a87f133750
[ "BSD-3-Clause", "0BSD" ]
1
2020-10-15T12:43:42.000Z
2020-10-15T12:43:42.000Z
django/contrib/admindocs/views.py
danhayden/django
49b470b9187b6be60e573fed08c8f4a87f133750
[ "BSD-3-Clause", "0BSD" ]
null
null
null
django/contrib/admindocs/views.py
danhayden/django
49b470b9187b6be60e573fed08c8f4a87f133750
[ "BSD-3-Clause", "0BSD" ]
2
2020-01-01T18:36:17.000Z
2022-02-21T14:00:56.000Z
import inspect from importlib import import_module from inspect import cleandoc from pathlib import Path from django.apps import apps from django.contrib import admin from django.contrib.admin.views.decorators import staff_member_required from django.contrib.admindocs import utils from django.contrib.admindocs.utils i...
37.325301
86
0.51162
import inspect from importlib import import_module from inspect import cleandoc from pathlib import Path from django.apps import apps from django.contrib import admin from django.contrib.admin.views.decorators import staff_member_required from django.contrib.admindocs import utils from django.contrib.admindocs.utils i...
true
true
f771e9506c4a8d4b88bf5dc3619c135095af62ae
3,813
py
Python
bc/bea_cukai/report/laporan_pertanggung_jawaban/laporan_pertanggung_jawaban.py
unitekmitrasolusi/bc
7edac6e7a0930c8fab8de83bc2845dbe6e82834c
[ "MIT" ]
null
null
null
bc/bea_cukai/report/laporan_pertanggung_jawaban/laporan_pertanggung_jawaban.py
unitekmitrasolusi/bc
7edac6e7a0930c8fab8de83bc2845dbe6e82834c
[ "MIT" ]
null
null
null
bc/bea_cukai/report/laporan_pertanggung_jawaban/laporan_pertanggung_jawaban.py
unitekmitrasolusi/bc
7edac6e7a0930c8fab8de83bc2845dbe6e82834c
[ "MIT" ]
null
null
null
# Copyright (c) 2013, PT. UNITEK MAS INDONESIA and contributors # For license information, please see license.txt # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe from frappe import _ fr...
35.305556
108
0.714136
from __future__ import unicode_literals import frappe from frappe import _ from frappe.utils import date_diff, flt from six import iteritems def execute(filters=None): columns = get_columns() item_details = get_fifo_queue(filters) to_date = filters["to_date"] data = [] for item, item_dict in iteritems(item_det...
true
true
f771e9a21c0cf8b0b6f82dc7a5bc86ab6f7e08e8
6,945
py
Python
backend/sparkling_breeze_32912/settings.py
crowdbotics-apps/sparkling-breeze-32912
a68e550325cd7823524e7a5f8559b756abe2c49b
[ "FTL", "AML", "RSA-MD" ]
null
null
null
backend/sparkling_breeze_32912/settings.py
crowdbotics-apps/sparkling-breeze-32912
a68e550325cd7823524e7a5f8559b756abe2c49b
[ "FTL", "AML", "RSA-MD" ]
20
2022-01-17T19:05:11.000Z
2022-01-17T19:05:23.000Z
backend/sparkling_breeze_32912/settings.py
crowdbotics-apps/sparkling-breeze-32912
a68e550325cd7823524e7a5f8559b756abe2c49b
[ "FTL", "AML", "RSA-MD" ]
null
null
null
""" Django settings for sparkling_breeze_32912 project. Generated by 'django-admin startproject' using Django 2.2.2. For more information on this file, see https://docs.djangoproject.com/en/2.2/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/2.2/ref/settings/ ""...
29.679487
112
0.731605
import os import environ import logging from modules.manifest import get_modules env = environ.Env() DEBUG = env.bool("DEBUG", default=False) # Build paths inside the project like this: os.path.join(BASE_DIR, ...) BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) # Quick-start development set...
true
true
f771ecd63b658cb7abddaae187b36e4e5c6a1534
9,933
py
Python
resnet.py
CaoQiNeng/python-classifier-2021
a6350988e7ecf0453aac2655f5b0d8af1e538bfc
[ "BSD-2-Clause" ]
null
null
null
resnet.py
CaoQiNeng/python-classifier-2021
a6350988e7ecf0453aac2655f5b0d8af1e538bfc
[ "BSD-2-Clause" ]
null
null
null
resnet.py
CaoQiNeng/python-classifier-2021
a6350988e7ecf0453aac2655f5b0d8af1e538bfc
[ "BSD-2-Clause" ]
null
null
null
# -*- coding: utf-8 -*- ''' update: 2021/5/18 lym ''' import torch import torch.nn.functional as F import torch.nn as nn import math import torch.utils.model_zoo as model_zoo from torchsummary import summary __all__ = ['ResNet', 'resnet18', 'resnet34', 'resnet50', 'resnet101', 'resnet152'] model_urls = ...
30.943925
113
0.596597
import torch import torch.nn.functional as F import torch.nn as nn import math import torch.utils.model_zoo as model_zoo from torchsummary import summary __all__ = ['ResNet', 'resnet18', 'resnet34', 'resnet50', 'resnet101', 'resnet152'] model_urls = { 'resnet18': 'https://download.pytorch.org/models/re...
true
true
f771eed6579ebbe361d5ecf015d37a19e27b97f6
702
py
Python
cartography/intel/okta/sync_state.py
sckevmit/cartography
fefb63b5ec97986dcc29038331d0e5b027b95d5f
[ "Apache-2.0" ]
2,322
2019-03-02T01:07:20.000Z
2022-03-31T20:39:12.000Z
cartography/intel/okta/sync_state.py
sckevmit/cartography
fefb63b5ec97986dcc29038331d0e5b027b95d5f
[ "Apache-2.0" ]
462
2019-03-07T18:38:11.000Z
2022-03-31T14:55:20.000Z
cartography/intel/okta/sync_state.py
sckevmit/cartography
fefb63b5ec97986dcc29038331d0e5b027b95d5f
[ "Apache-2.0" ]
246
2019-03-03T02:39:23.000Z
2022-02-24T09:46:38.000Z
# Okta intel module - sync state from typing import List from typing import Optional class OktaSyncState: """ Okta sync state. Object used to store sync data to allow each stages to share data. For example, saving user and group list returned by Okta instead of asking the Graph for factor and role sta...
29.25
119
0.660969
from typing import List from typing import Optional class OktaSyncState: def __init__( self, user: Optional[List[str]] = None, groups: Optional[List[str]] = None, ) -> None: self.users = user self.groups = groups
true
true
f771effb92e4ad56ca983387a0a498f1072b6a48
8,252
py
Python
wagtail/core/blocks/struct_block.py
noslouch/wagtail
6126510176572b864dc3976faf0dca6228cf1158
[ "BSD-3-Clause" ]
null
null
null
wagtail/core/blocks/struct_block.py
noslouch/wagtail
6126510176572b864dc3976faf0dca6228cf1158
[ "BSD-3-Clause" ]
4
2020-06-05T17:00:01.000Z
2021-06-17T20:15:01.000Z
wagtail/core/blocks/struct_block.py
isotoma/wagtail-1
4c5eed2dd00f92e678916cc7217f28aa35ae0603
[ "BSD-3-Clause" ]
1
2019-04-16T14:14:55.000Z
2019-04-16T14:14:55.000Z
import collections from django import forms from django.contrib.staticfiles.templatetags.staticfiles import static from django.core.exceptions import ValidationError from django.forms.utils import ErrorList from django.template.loader import render_to_string from django.utils.functional import cached_property from dja...
38.381395
107
0.64142
import collections from django import forms from django.contrib.staticfiles.templatetags.staticfiles import static from django.core.exceptions import ValidationError from django.forms.utils import ErrorList from django.template.loader import render_to_string from django.utils.functional import cached_property from dja...
true
true
f771f06507ad2eacd30dc9f0d5e2387412f78178
364
py
Python
utils.py
berlala/traffic_light_tf
27e281010b0aa35b800c6d5e19ecab8dfcb8fdd4
[ "Apache-2.0" ]
null
null
null
utils.py
berlala/traffic_light_tf
27e281010b0aa35b800c6d5e19ecab8dfcb8fdd4
[ "Apache-2.0" ]
null
null
null
utils.py
berlala/traffic_light_tf
27e281010b0aa35b800c6d5e19ecab8dfcb8fdd4
[ "Apache-2.0" ]
null
null
null
RED = 0 YELLOW = 1 GREEN = 2 # Image setting IMAGE_HEIGHT = 32 IMAGE_WIDTH = 32 IMAGE_CHANNEL = 3 IMAGE_CLASSIFY = 3 #Training data lr = 0.0001 epochs = 50 batch_size = 128 mu = 0 sigma = 0.1 def get_traffic_name(label): if label == RED: return "red" if label == YELLOW: return "yellow" ...
12.551724
28
0.620879
RED = 0 YELLOW = 1 GREEN = 2 IMAGE_HEIGHT = 32 IMAGE_WIDTH = 32 IMAGE_CHANNEL = 3 IMAGE_CLASSIFY = 3 lr = 0.0001 epochs = 50 batch_size = 128 mu = 0 sigma = 0.1 def get_traffic_name(label): if label == RED: return "red" if label == YELLOW: return "yellow" if label == GREEN: re...
true
true
f771f0a4327ed23117c8fc2749b4f426810e8ed6
4,413
py
Python
data/pkt_parse/dpkt_mod/pcap.py
yiannisy/behop-misc
75290bafaa1acc312a0d9eea06ddeb1d94cf48da
[ "MIT" ]
null
null
null
data/pkt_parse/dpkt_mod/pcap.py
yiannisy/behop-misc
75290bafaa1acc312a0d9eea06ddeb1d94cf48da
[ "MIT" ]
null
null
null
data/pkt_parse/dpkt_mod/pcap.py
yiannisy/behop-misc
75290bafaa1acc312a0d9eea06ddeb1d94cf48da
[ "MIT" ]
null
null
null
# $Id: pcap.py 56 2009-11-06 22:28:26Z jon.oberheide $ """Libpcap file format.""" import sys, time import dpkt TCPDUMP_MAGIC = 0xa1b2c3d4L PMUDPCT_MAGIC = 0xd4c3b2a1L PCAP_VERSION_MAJOR = 2 PCAP_VERSION_MINOR = 4 DLT_NULL = 0 DLT_EN10MB = 1 DLT_EN3MB = 2 DLT_AX25 ...
28.10828
115
0.542035
"""Libpcap file format.""" import sys, time import dpkt TCPDUMP_MAGIC = 0xa1b2c3d4L PMUDPCT_MAGIC = 0xd4c3b2a1L PCAP_VERSION_MAJOR = 2 PCAP_VERSION_MINOR = 4 DLT_NULL = 0 DLT_EN10MB = 1 DLT_EN3MB = 2 DLT_AX25 = 3 DLT_PRONET = 4 DLT_CHAOS ...
false
true
f771f168ce637bdbe11b82a9205fddb94bd8d7c2
18,034
py
Python
client/api/assignment.py
tom11my/ok-client
0401df30b2403650b41dec96e26a9ed5890fd7d1
[ "Apache-2.0" ]
null
null
null
client/api/assignment.py
tom11my/ok-client
0401df30b2403650b41dec96e26a9ed5890fd7d1
[ "Apache-2.0" ]
null
null
null
client/api/assignment.py
tom11my/ok-client
0401df30b2403650b41dec96e26a9ed5890fd7d1
[ "Apache-2.0" ]
1
2022-01-12T17:11:23.000Z
2022-01-12T17:11:23.000Z
import uuid from datetime import timedelta import requests from client import exceptions as ex from client.sources.common import core from client.utils import auth, format, encryption from client.protocols.grading import grade from client.cli.common import messages import client import collections import glob import...
37.337474
123
0.589609
import uuid from datetime import timedelta import requests from client import exceptions as ex from client.sources.common import core from client.utils import auth, format, encryption from client.protocols.grading import grade from client.cli.common import messages import client import collections import glob import...
true
true
f771f1d88b13cd8e50e149e761b8322f95d76912
819
py
Python
hierarchial_data/urls.py
KA-Randy-Charity-Jr/hierarchial_data
3528a5ab5187a2aaf4374f1b4805a33c548ab22a
[ "MIT" ]
null
null
null
hierarchial_data/urls.py
KA-Randy-Charity-Jr/hierarchial_data
3528a5ab5187a2aaf4374f1b4805a33c548ab22a
[ "MIT" ]
null
null
null
hierarchial_data/urls.py
KA-Randy-Charity-Jr/hierarchial_data
3528a5ab5187a2aaf4374f1b4805a33c548ab22a
[ "MIT" ]
null
null
null
"""hierarchial_data URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/3.1/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') Cl...
34.125
77
0.714286
from django.contrib import admin from django.urls import path from hierarchyapp import views urlpatterns = [ path('',views.indexview), path('admin/', admin.site.urls), ]
true
true
f771f23511a8492961d3ddd059e0503ef4a40a3e
1,294
py
Python
cal_class.py
kwondohun0308/Beakjoon
65e8c1015bcb3bb757d8056525034ee333ecb681
[ "MIT" ]
null
null
null
cal_class.py
kwondohun0308/Beakjoon
65e8c1015bcb3bb757d8056525034ee333ecb681
[ "MIT" ]
null
null
null
cal_class.py
kwondohun0308/Beakjoon
65e8c1015bcb3bb757d8056525034ee333ecb681
[ "MIT" ]
null
null
null
import math class calc: def __init__(self): self.result = 0 def add(a,b): self.result += float(b) return self.result def minus(a,b): self.result -= float(b) return self.result def c_(self): self.result = 0 return 0 def mult(a,b)...
19.907692
45
0.523957
import math class calc: def __init__(self): self.result = 0 def add(a,b): self.result += float(b) return self.result def minus(a,b): self.result -= float(b) return self.result def c_(self): self.result = 0 return 0 def mult(a,b)...
true
true
f771f389eb62179f1d7acd178419b5c9fbc01f9b
17,354
py
Python
nrf802154_sniffer.py
KaSroka/nRF-802.15.4-sniffer
6e1c80ea3ca4d90ff9ca6c9a7c3f6355ec68b39e
[ "BSD-3-Clause" ]
null
null
null
nrf802154_sniffer.py
KaSroka/nRF-802.15.4-sniffer
6e1c80ea3ca4d90ff9ca6c9a7c3f6355ec68b39e
[ "BSD-3-Clause" ]
null
null
null
nrf802154_sniffer.py
KaSroka/nRF-802.15.4-sniffer
6e1c80ea3ca4d90ff9ca6c9a7c3f6355ec68b39e
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python # Copyright 2018, Nordic Semiconductor ASA # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, this...
38.910314
171
0.60038
import sys import os is_standalone = __name__ == '__main__' if sys.version[0] == '2': import Queue as Queue else: import queue as Queue if __name__ == '__main__': sys.path.insert(0, os.getcwd()) import re import select import signal import struct import threading import time import logging from a...
true
true
f771f3d7c58e6eb1a23cdd57ef32915624b62fdb
6,671
py
Python
saleor/webhook/tests/test_webhook_payloads.py
largotuan/sonjay
9826dc7dfe9acd5a03aaa136020f105309805402
[ "CC-BY-4.0" ]
1
2021-03-23T20:27:50.000Z
2021-03-23T20:27:50.000Z
saleor/webhook/tests/test_webhook_payloads.py
kobbycyber/saleor
a7aa9e786d5c55243433800e414703fdcebbea23
[ "CC-BY-4.0" ]
18
2021-03-23T20:32:14.000Z
2022-03-12T01:04:06.000Z
saleor/webhook/tests/test_webhook_payloads.py
kobbycyber/saleor
a7aa9e786d5c55243433800e414703fdcebbea23
[ "CC-BY-4.0" ]
2
2021-12-03T16:59:37.000Z
2022-02-19T13:05:42.000Z
import json from decimal import Decimal from itertools import chain from unittest.mock import ANY import graphene from ...discount import DiscountValueType, OrderDiscountType from ...product.models import ProductVariant from ..payloads import ( ORDER_FIELDS, PRODUCT_VARIANT_FIELDS, generate_order_payload,...
35.865591
88
0.696447
import json from decimal import Decimal from itertools import chain from unittest.mock import ANY import graphene from ...discount import DiscountValueType, OrderDiscountType from ...product.models import ProductVariant from ..payloads import ( ORDER_FIELDS, PRODUCT_VARIANT_FIELDS, generate_order_payload,...
true
true
f771f4c1fc08df48405bafd8b256eab429228827
37,987
py
Python
python/ccxt/async/hitbtc2.py
kornrunner/ccxt-origin
26777e0159be8e3b887cb2ee824247e41fc2591e
[ "MIT" ]
null
null
null
python/ccxt/async/hitbtc2.py
kornrunner/ccxt-origin
26777e0159be8e3b887cb2ee824247e41fc2591e
[ "MIT" ]
null
null
null
python/ccxt/async/hitbtc2.py
kornrunner/ccxt-origin
26777e0159be8e3b887cb2ee824247e41fc2591e
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from ccxt.async.hitbtc import hitbtc import base64 import math import json from ccxt.base.errors import ExchangeError from ccxt.base.errors import InsufficientFunds from ccxt.base.errors import OrderNotFound class hitbtc2 (hitbtc): def describe(self): return self.deep_extend(supe...
37.09668
126
0.365204
from ccxt.async.hitbtc import hitbtc import base64 import math import json from ccxt.base.errors import ExchangeError from ccxt.base.errors import InsufficientFunds from ccxt.base.errors import OrderNotFound class hitbtc2 (hitbtc): def describe(self): return self.deep_extend(super(hitbtc2, self).describ...
false
true
f771f5ce723c500bc4a73dfdcc86484550a7e272
1,809
py
Python
tests/test_viewsets.py
wwnbb/drf-rw-serializers
cd00f2a417b76681862d5c4cf9817016d07f8dfc
[ "MIT" ]
null
null
null
tests/test_viewsets.py
wwnbb/drf-rw-serializers
cd00f2a417b76681862d5c4cf9817016d07f8dfc
[ "MIT" ]
null
null
null
tests/test_viewsets.py
wwnbb/drf-rw-serializers
cd00f2a417b76681862d5c4cf9817016d07f8dfc
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Tests for the `drf-rw-serializers` viewsets module. """ from __future__ import absolute_import, unicode_literals from django.utils import version as django_version from model_mommy import mommy from test_utils.base_tests import ( BaseTestCase, TestListRequestSucc...
38.489362
98
0.766722
from __future__ import absolute_import, unicode_literals from django.utils import version as django_version from model_mommy import mommy from test_utils.base_tests import ( BaseTestCase, TestListRequestSuccess, TestRetrieveRequestSuccess, TestCreateRequestSuccess, TestUpdateRequestSuccess) from example_app....
true
true
f771f6492df3ea4f94c17b6e5a6a3f07d5dacf26
7,293
py
Python
posthog/api/test/test_preflight.py
FarazPatankar/posthog
dddf2644376d0fd6836ed96c139f6a825c74202f
[ "MIT" ]
1
2021-06-17T20:59:38.000Z
2021-06-17T20:59:38.000Z
posthog/api/test/test_preflight.py
FarazPatankar/posthog
dddf2644376d0fd6836ed96c139f6a825c74202f
[ "MIT" ]
1
2021-10-13T10:05:26.000Z
2021-10-13T10:05:26.000Z
posthog/api/test/test_preflight.py
FarazPatankar/posthog
dddf2644376d0fd6836ed96c139f6a825c74202f
[ "MIT" ]
1
2021-06-17T02:18:43.000Z
2021-06-17T02:18:43.000Z
from typing import cast import pytest from django.conf import settings from django.utils import timezone from rest_framework import status from posthog.constants import RDBMS from posthog.models import User from posthog.models.organization import OrganizationInvite from posthog.test.base import APIBaseTest from posth...
39.852459
117
0.53901
from typing import cast import pytest from django.conf import settings from django.utils import timezone from rest_framework import status from posthog.constants import RDBMS from posthog.models import User from posthog.models.organization import OrganizationInvite from posthog.test.base import APIBaseTest from posth...
true
true
f771f8b324cc001c9adee6991c2bd60507052141
24,085
py
Python
applications/popart/bert/phased_execution/bert_layers.py
kew96/GraphcoreExamples
22dc0d7e3755b0a7f16cdf694c6d10c0f91ee8eb
[ "MIT" ]
null
null
null
applications/popart/bert/phased_execution/bert_layers.py
kew96/GraphcoreExamples
22dc0d7e3755b0a7f16cdf694c6d10c0f91ee8eb
[ "MIT" ]
null
null
null
applications/popart/bert/phased_execution/bert_layers.py
kew96/GraphcoreExamples
22dc0d7e3755b0a7f16cdf694c6d10c0f91ee8eb
[ "MIT" ]
null
null
null
# Copyright (c) 2020 Graphcore Ltd. 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...
43.711434
152
0.535894
import numpy as np import popart from phased_execution.layers import Dense, Dropout, Norm, Split from phased_execution.nn import Block, Parameter __all__ = [ "Attention", "FeedForward", "MaskLM", "NextSentencePred", "SquadProjection" ] class Attention(Block): def __init__(self, name: str, ...
true
true
f771f99d64425506fb839c3cbd1632afc39184e7
2,522
py
Python
cinder/tests/unit/volume/drivers/dell_emc/vnx/utils.py
2020human/cinder
04528318848620e4ce2639ea2dd5323783dc7a1f
[ "Apache-2.0" ]
null
null
null
cinder/tests/unit/volume/drivers/dell_emc/vnx/utils.py
2020human/cinder
04528318848620e4ce2639ea2dd5323783dc7a1f
[ "Apache-2.0" ]
null
null
null
cinder/tests/unit/volume/drivers/dell_emc/vnx/utils.py
2020human/cinder
04528318848620e4ce2639ea2dd5323783dc7a1f
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2016 EMC Corporation, 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 ap...
29.325581
76
0.705393
from os import path import mock import six import yaml from cinder.volume.drivers.dell_emc.vnx import client from cinder.volume.drivers.dell_emc.vnx import common patch_sleep = mock.patch('time.sleep') patch_vnxsystem = mock.patch('storops.VNXSystem') def load_yaml(file_name): yaml_file = '{}/{}'.format(p...
true
true
f771fa1f5c052ed006199f144dd6a10f50c12cdc
415,957
py
Python
resource.py
daicoolb/label2img
4d4028abc8c3b789181c185001cfafed046d0def
[ "MIT" ]
3
2018-04-11T08:00:18.000Z
2018-07-26T05:19:08.000Z
resource.py
daicoolb/label2img
4d4028abc8c3b789181c185001cfafed046d0def
[ "MIT" ]
null
null
null
resource.py
daicoolb/label2img
4d4028abc8c3b789181c185001cfafed046d0def
[ "MIT" ]
1
2021-04-30T11:35:45.000Z
2021-04-30T11:35:45.000Z
# -*- coding: utf-8 -*- # Resource object code # # Created by: The Resource Compiler for PyQt5 (Qt v5.10.1) # # WARNING! All changes made in this file will be lost! from PyQt5 import QtCore qt_resource_data = b"\ \x00\x00\x04\x4b\ \x89\ \x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\ ...
65.186805
104
0.715608
from PyQt5 import QtCore qt_resource_data = b"\ \x00\x00\x04\x4b\ \x89\ \x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\ \x00\x00\x18\x00\x00\x00\x18\x08\x06\x00\x00\x00\xe0\x77\x3d\xf8\ \x00\x00\x00\x04\x67\x41\x4d\x41\x00\x00\xb1\x8f\x0b\xfc\x61\x05\ \x00\x00\x00\x06\x62\x4b\x47\x44\x00\...
true
true
f771fa8fce98c1f1e7133443609831d2949ce248
18,981
py
Python
examples/pipeline_wav2letter/main.py
zkneupper/audio
1f136671b84071a2fe1d5b762df64f3a76310c31
[ "BSD-2-Clause" ]
null
null
null
examples/pipeline_wav2letter/main.py
zkneupper/audio
1f136671b84071a2fe1d5b762df64f3a76310c31
[ "BSD-2-Clause" ]
null
null
null
examples/pipeline_wav2letter/main.py
zkneupper/audio
1f136671b84071a2fe1d5b762df64f3a76310c31
[ "BSD-2-Clause" ]
null
null
null
import argparse import logging import os import string from datetime import datetime from time import time import torch import torchaudio from torch.optim import SGD, Adadelta, Adam, AdamW from torch.optim.lr_scheduler import ExponentialLR, ReduceLROnPlateau from torch.utils.data import DataLoader from torchaudio.data...
28.585843
93
0.60529
import argparse import logging import os import string from datetime import datetime from time import time import torch import torchaudio from torch.optim import SGD, Adadelta, Adam, AdamW from torch.optim.lr_scheduler import ExponentialLR, ReduceLROnPlateau from torch.utils.data import DataLoader from torchaudio.data...
true
true
f771fb844fc420d5c3fd40f283da60fb0b43fc25
63,711
py
Python
fsociety.py
lamanihani/fsociety
76456cfc2ae39678949138e9e838ce2597841cd3
[ "MIT" ]
5
2018-03-26T12:29:57.000Z
2019-02-24T02:28:40.000Z
fsociety.py
lamanihani/fsociety
76456cfc2ae39678949138e9e838ce2597841cd3
[ "MIT" ]
null
null
null
fsociety.py
lamanihani/fsociety
76456cfc2ae39678949138e9e838ce2597841cd3
[ "MIT" ]
1
2019-09-06T18:19:34.000Z
2019-09-06T18:19:34.000Z
#!/usr/bin/env python2 # ______ _ _ _______ # | ____| (_) | | |__ __| # | |__ ___ ___ ___ _ ___| |_ _ _ | | ___ __ _ _ __ ___ # | __/ __|/ _ \ / __| |/ _ \ __| | | | | |/ _ \/ _` | '_ ` _ \ # | | \__ \ (_) | (__| | __/ |_| |_| | | | __...
30.615569
371
0.524274
# | | \__ \ (_) | (__| | __/ |_| |_| | | | __/ (_| | | | | | | # |_| |___/\___/ \___|_|\___|\__|\__, | |_|\___|\__,_|_| |_| |_| # __/ | # |___/ # # # Greet's To ''' Imports ''' import sys import argparse i...
false
true
f771fba2e30ec8c89205cafe3854d9b23a06b96f
1,653
py
Python
estorage/archive/state.py
EnergyModels/estorage
0f84c87632dba1ff0564ffb68f59ece314f67022
[ "MIT" ]
null
null
null
estorage/archive/state.py
EnergyModels/estorage
0f84c87632dba1ff0564ffb68f59ece314f67022
[ "MIT" ]
null
null
null
estorage/archive/state.py
EnergyModels/estorage
0f84c87632dba1ff0564ffb68f59ece314f67022
[ "MIT" ]
null
null
null
from CoolProp.CoolProp import PropsSI import pandas as pd class State: self.fluid = T self.T = T self.p = p self.h = PropsSI('H', 'T', T, 'P', p, fluid) self.s = PropsSI('S', 'T', T, 'P', p, fluid) self.D = PropsSI('D', 'T', T, 'P', p, fluid) class Flow(State): self.m_dot = T def def_st...
22.958333
62
0.514217
from CoolProp.CoolProp import PropsSI import pandas as pd class State: self.fluid = T self.T = T self.p = p self.h = PropsSI('H', 'T', T, 'P', p, fluid) self.s = PropsSI('S', 'T', T, 'P', p, fluid) self.D = PropsSI('D', 'T', T, 'P', p, fluid) class Flow(State): self.m_dot = T def def_st...
true
true
f771fbdbee26c8863561a4a460bced1a9b8776e1
1,010
py
Python
scripts/notify.py
pine/eg-web-appview
8f7387ece50b6e3d7ff8f1980167245c8009d05b
[ "MIT" ]
4
2019-07-31T15:57:13.000Z
2019-08-01T17:28:03.000Z
scripts/notify.py
pine/eg-web-appview
8f7387ece50b6e3d7ff8f1980167245c8009d05b
[ "MIT" ]
null
null
null
scripts/notify.py
pine/eg-web-appview
8f7387ece50b6e3d7ff8f1980167245c8009d05b
[ "MIT" ]
null
null
null
#!/usr/bin/env python import os import sys import slackweb username = 'CircleCI' icon_url = 'https://i.imgur.com/FLjAA35.png' def main(): message = sys.argv[1] if message == 'started': _notify('Deploy started', '#66d3e4') elif message == 'successful': _notify('Deploy successful', '#41aa5...
22.444444
68
0.59604
import os import sys import slackweb username = 'CircleCI' icon_url = 'https://i.imgur.com/FLjAA35.png' def main(): message = sys.argv[1] if message == 'started': _notify('Deploy started', '#66d3e4') elif message == 'successful': _notify('Deploy successful', '#41aa58') elif message =...
true
true
f771fd240ad6d221c8bbe6d8421d7d3088f5877b
858
py
Python
examples/reader_plugin.py
mkitti/napari
4e954d30b5a1b70c5e495db1b8f48a3bdda1ff86
[ "BSD-3-Clause" ]
1
2021-04-24T10:10:54.000Z
2021-04-24T10:10:54.000Z
examples/reader_plugin.py
mkitti/napari
4e954d30b5a1b70c5e495db1b8f48a3bdda1ff86
[ "BSD-3-Clause" ]
17
2020-06-11T21:02:03.000Z
2021-02-02T19:10:19.000Z
examples/reader_plugin.py
mkitti/napari
4e954d30b5a1b70c5e495db1b8f48a3bdda1ff86
[ "BSD-3-Clause" ]
1
2020-07-19T18:03:35.000Z
2020-07-19T18:03:35.000Z
"""Barebones reader plugin example, using imageio.imread""" from napari_plugin_engine import napari_hook_implementation from imageio import formats, imread readable_extensions = tuple(set(x for f in formats for x in f.extensions)) @napari_hook_implementation def napari_get_reader(path): """A basic implementatio...
34.32
79
0.734266
from napari_plugin_engine import napari_hook_implementation from imageio import formats, imread readable_extensions = tuple(set(x for f in formats for x in f.extensions)) @napari_hook_implementation def napari_get_reader(path): if not path.endswith(readable_extensions): return None return re...
true
true
f771fe4380b36005e372fbee3f2f69d7881d5af9
135
py
Python
urdu_python/__main__.py
SaadBazaz/urdu_python_kernel
3e340bb9f3bed00363f5f4722cdfe2f6e270564a
[ "BSD-3-Clause" ]
null
null
null
urdu_python/__main__.py
SaadBazaz/urdu_python_kernel
3e340bb9f3bed00363f5f4722cdfe2f6e270564a
[ "BSD-3-Clause" ]
null
null
null
urdu_python/__main__.py
SaadBazaz/urdu_python_kernel
3e340bb9f3bed00363f5f4722cdfe2f6e270564a
[ "BSD-3-Clause" ]
null
null
null
from ipykernel.kernelapp import IPKernelApp from . import UrduPythonKernel IPKernelApp.launch_instance(kernel_class=UrduPythonKernel)
27
58
0.881481
from ipykernel.kernelapp import IPKernelApp from . import UrduPythonKernel IPKernelApp.launch_instance(kernel_class=UrduPythonKernel)
true
true
f771ff0aad5b358b10363f3fb92fb189e8239ff5
7,670
py
Python
rqalpha/mod/rqalpha_mod_sys_analyser/plot.py
kerwinxu/rqalpha_local
f90da95085df91706ebba8fc905b4cdc85492b11
[ "Apache-2.0" ]
null
null
null
rqalpha/mod/rqalpha_mod_sys_analyser/plot.py
kerwinxu/rqalpha_local
f90da95085df91706ebba8fc905b4cdc85492b11
[ "Apache-2.0" ]
null
null
null
rqalpha/mod/rqalpha_mod_sys_analyser/plot.py
kerwinxu/rqalpha_local
f90da95085df91706ebba8fc905b4cdc85492b11
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # # Last Change: 2018-01-09 09:24:03 # Copyright 2017 Ricequant, Inc # # 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....
40.157068
136
0.647066
import rqalpha from rqalpha.utils.logger import system_log from rqalpha.utils.i18n import gettext def plot_result(result_dict, show_windows=True, savefile=None): import os from matplotlib import rcParams, gridspec, ticker, image as mpimg, pyplot as plt from matplotlib.font_manager import findfont, FontPr...
true
true
f772001a8d6e9d2f89ed6c18a8b90958678a5bc2
3,574
py
Python
uvf.py
novid1134/solar-3d
1e5b77173abb0d805b3cc613e0a7ab3f063fb7e3
[ "MIT" ]
32
2018-05-08T15:52:58.000Z
2022-02-09T11:24:13.000Z
uvf.py
novid1134/solar-3d
1e5b77173abb0d805b3cc613e0a7ab3f063fb7e3
[ "MIT" ]
5
2018-05-25T11:56:27.000Z
2020-06-21T18:43:10.000Z
uvf.py
novid1134/solar-3d
1e5b77173abb0d805b3cc613e0a7ab3f063fb7e3
[ "MIT" ]
23
2018-08-09T15:06:04.000Z
2022-03-21T23:28:25.000Z
# universal variable formulation, 3rd order differential equation solver for orbital prediction, # implemented due to huge efficiency issues when using conventional methods (loops, recursion), # algorithms based on Vectorized Analytic Two Body Propagator in MATLAB Copyright (c) 2012, Darin Koblick from scipy.spatial.d...
30.810345
112
0.55596
from scipy.spatial.distance import cdist from vis import * from parameters import u, sun_radius import numpy as np u2 = np.sqrt(u) def c2c3(psi): c2, c3 = 0, 0 if np.any(psi > 1e-6): c2 = (1 - np.cos(np.sqrt(psi))) / psi c3 = (np.sqrt(psi) - np.sin(np.sqrt(psi))) / np.sqrt(psi ** 3) ...
true
true