hexsha
stringlengths
40
40
size
int64
4
996k
ext
stringclasses
8 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
4
996k
avg_line_length
float64
1.33
58.2k
max_line_length
int64
2
323k
alphanum_fraction
float64
0
0.97
content_no_comment
stringlengths
0
946k
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
f7fe22be8e9933d73e58f8f86a8508c7b07bfe49
7,375
py
Python
glib/glib-2.46.2/glib/glib.py
imx6uldev/depedency_tools
0748392a4e97ded2a770b6fbcab281dd3fda2db7
[ "MIT" ]
null
null
null
glib/glib-2.46.2/glib/glib.py
imx6uldev/depedency_tools
0748392a4e97ded2a770b6fbcab281dd3fda2db7
[ "MIT" ]
1
2020-10-13T07:38:31.000Z
2020-10-13T07:38:31.000Z
migrate/glib/glib/glib.py
zhongliangkang/twemproxy41
8dc3664145b0fcdd32fa321720235a9db9b3cece
[ "Apache-2.0" ]
1
2020-02-04T15:39:06.000Z
2020-02-04T15:39:06.000Z
import gdb import sys if sys.version_info[0] >= 3: long = int # This is not quite right, as local vars may override symname def read_global_var (symname): return gdb.selected_frame().read_var(symname) def g_quark_to_string (quark): if quark == None: return None quark = long(quark) if quar...
28.585271
122
0.532068
import gdb import sys if sys.version_info[0] >= 3: long = int def read_global_var (symname): return gdb.selected_frame().read_var(symname) def g_quark_to_string (quark): if quark == None: return None quark = long(quark) if quark == 0: return None try: val = read_globa...
true
true
f7fe22cb63026328e9f656be2ab16fc1b93bb460
188
py
Python
openiPrototype/openiPrototype/APIS/Products_and_Services/Service/admin.py
OPENi-ict/ntua_demo
104118fbe1f54db35386ca96286317ceb64cb658
[ "Apache-2.0" ]
null
null
null
openiPrototype/openiPrototype/APIS/Products_and_Services/Service/admin.py
OPENi-ict/ntua_demo
104118fbe1f54db35386ca96286317ceb64cb658
[ "Apache-2.0" ]
null
null
null
openiPrototype/openiPrototype/APIS/Products_and_Services/Service/admin.py
OPENi-ict/ntua_demo
104118fbe1f54db35386ca96286317ceb64cb658
[ "Apache-2.0" ]
null
null
null
__author__ = 'mpetyx' from django.contrib import admin from .models import OpeniService class ServiceAdmin(admin.ModelAdmin): pass admin.site.register(OpeniService, ServiceAdmin)
15.666667
47
0.792553
__author__ = 'mpetyx' from django.contrib import admin from .models import OpeniService class ServiceAdmin(admin.ModelAdmin): pass admin.site.register(OpeniService, ServiceAdmin)
true
true
f7fe22dedc1d45f27e90b38334c2e9aa6fce5232
192
py
Python
packages/api-server/api_server/models/tortoise_models/building_map.py
Sald-for-Communication-and-IT/rmf-web
ec5996ab0b06440d7147170f3030b14c73d26116
[ "Apache-2.0" ]
23
2021-04-13T23:01:12.000Z
2022-03-21T02:15:24.000Z
packages/api-server/api_server/models/tortoise_models/building_map.py
Sald-for-Communication-and-IT/rmf-web
ec5996ab0b06440d7147170f3030b14c73d26116
[ "Apache-2.0" ]
326
2021-03-10T17:32:17.000Z
2022-03-30T04:42:14.000Z
packages/api-server/api_server/models/tortoise_models/building_map.py
Sald-for-Communication-and-IT/rmf-web
ec5996ab0b06440d7147170f3030b14c73d26116
[ "Apache-2.0" ]
13
2021-04-10T10:33:36.000Z
2022-02-22T15:39:58.000Z
from tortoise.fields.data import CharField, JSONField from tortoise.models import Model class BuildingMap(Model): id_ = CharField(255, pk=True, source_field="id") data = JSONField()
24
53
0.75
from tortoise.fields.data import CharField, JSONField from tortoise.models import Model class BuildingMap(Model): id_ = CharField(255, pk=True, source_field="id") data = JSONField()
true
true
f7fe242228bbaac9f15fc53c10452ad9b7032dc8
15,615
py
Python
flask_admin/form/upload.py
gstf/flask-admin
5f1b2d8813c7aa048862a820d17a6efbeba8c42f
[ "BSD-3-Clause" ]
null
null
null
flask_admin/form/upload.py
gstf/flask-admin
5f1b2d8813c7aa048862a820d17a6efbeba8c42f
[ "BSD-3-Clause" ]
null
null
null
flask_admin/form/upload.py
gstf/flask-admin
5f1b2d8813c7aa048862a820d17a6efbeba8c42f
[ "BSD-3-Clause" ]
null
null
null
import os import os.path as op from werkzeug import secure_filename from werkzeug.datastructures import FileStorage from wtforms import ValidationError, fields from wtforms.widgets import HTMLString, html_params try: from wtforms.fields.core import _unset_value as unset_value except ImportError: from wtforms...
33.580645
117
0.57464
import os import os.path as op from werkzeug import secure_filename from werkzeug.datastructures import FileStorage from wtforms import ValidationError, fields from wtforms.widgets import HTMLString, html_params try: from wtforms.fields.core import _unset_value as unset_value except ImportError: from wtforms...
true
true
f7fe243f1a8d1d2561bc5a138675a4aed8ce94e7
3,239
py
Python
examples/stats.py
mojodojo101/TryHarder-InfoSecPrep
3fd4f96590704ba086335ab847173751ad56f580
[ "MIT" ]
5
2020-10-28T04:05:10.000Z
2021-11-30T09:42:16.000Z
examples/stats.py
mojodojo101/TryHarder-InfoSecPrep
3fd4f96590704ba086335ab847173751ad56f580
[ "MIT" ]
1
2020-10-28T03:45:52.000Z
2020-10-28T03:45:52.000Z
examples/stats.py
mojodojo101/TryHarder-InfoSecPrep
3fd4f96590704ba086335ab847173751ad56f580
[ "MIT" ]
5
2020-04-22T08:02:39.000Z
2021-06-30T06:30:31.000Z
import discord from discord.ext import commands from builtins import bot @commands.command() async def stats(ctx): server = ctx.guild channel = discord.utils.get(server.channels, name="bot-commands") if ctx.channel == channel: totalMembers = str(server.member_count) oscp_S_Role = discord.u...
62.288462
204
0.712874
import discord from discord.ext import commands from builtins import bot @commands.command() async def stats(ctx): server = ctx.guild channel = discord.utils.get(server.channels, name="bot-commands") if ctx.channel == channel: totalMembers = str(server.member_count) oscp_S_Role = discord.u...
true
true
f7fe24b7a74fb7434d50614c7027afdf173ed32a
11,318
py
Python
python-micro-service-master/.venv/lib/site-packages/winpty/ptyprocess.py
hiepvo01/AnimeRecommendationSystem
662531fc72134caedcd8e1dee7fefd3bdb0017a2
[ "MIT" ]
3
2020-07-09T18:52:40.000Z
2020-07-13T08:46:44.000Z
python-micro-service-master/.venv/lib/site-packages/winpty/ptyprocess.py
hiepvo01/AnimeRecommendationSystem
662531fc72134caedcd8e1dee7fefd3bdb0017a2
[ "MIT" ]
4
2021-03-11T05:09:40.000Z
2021-09-02T15:56:43.000Z
python-micro-service-master/.venv/lib/site-packages/winpty/ptyprocess.py
hiepvo01/AnimeRecommendationSystem
662531fc72134caedcd8e1dee7fefd3bdb0017a2
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Standard library imports import codecs import os import shlex import signal import socket import subprocess import threading import time try: from shutil import which except ImportError: from backports.shutil_which import which # Local imports from .winpty_wrapper import PTY, PY2 ...
31.614525
83
0.570949
import codecs import os import shlex import signal import socket import subprocess import threading import time try: from shutil import which except ImportError: from backports.shutil_which import which from .winpty_wrapper import PTY, PY2 class PtyProcess(object): def __init__(self, pty): ...
true
true
f7fe24ef1d6121951c07ba0175fe1f3920d6cb56
27
py
Python
funcutils/__init__.py
juanmacaaz/FuncTools
2bddc358d88262ee8dbd3728342b7fe0ac713f3c
[ "Apache-2.0" ]
1
2021-12-09T00:04:55.000Z
2021-12-09T00:04:55.000Z
funcutils/__init__.py
juanmacaaz/FuncUtils
2bddc358d88262ee8dbd3728342b7fe0ac713f3c
[ "Apache-2.0" ]
null
null
null
funcutils/__init__.py
juanmacaaz/FuncUtils
2bddc358d88262ee8dbd3728342b7fe0ac713f3c
[ "Apache-2.0" ]
null
null
null
from .funcutils import cost
27
27
0.851852
from .funcutils import cost
true
true
f7fe263c6c4ab951b8a670bef02692cf8c999564
14,357
py
Python
dbt/adapters/impala/impl.py
cloudera/dbt-impala
e8cd3eea6f0cdff49da043f4c1b49f3d88edf7a2
[ "Apache-2.0" ]
6
2022-03-28T23:14:21.000Z
2022-03-31T03:49:50.000Z
dbt/adapters/impala/impl.py
cloudera/dbt-impala
e8cd3eea6f0cdff49da043f4c1b49f3d88edf7a2
[ "Apache-2.0" ]
1
2022-03-25T20:15:48.000Z
2022-03-25T20:15:48.000Z
dbt/adapters/impala/impl.py
cloudera/dbt-impala
e8cd3eea6f0cdff49da043f4c1b49f3d88edf7a2
[ "Apache-2.0" ]
null
null
null
# Copyright 2022 Cloudera 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 writing...
36.531807
141
0.605767
from dbt.adapters.sql import SQLAdapter from dbt.adapters.impala import ImpalaConnectionManager import re from typing import List, Tuple, Dict, Iterable, Any import agate import dbt.exceptions from dbt.exceptions import warn_or_error from dbt.contracts.relation import RelationType from dbt.adapters.i...
true
true
f7fe26fc9905146c59da68e6f935fdc8d6271c10
13,934
py
Python
src/semseg/data/potsdam.py
Suerte412/SemSeg
46515f36291bb7e068ceb1b455fe1fc4a26842ef
[ "Apache-2.0" ]
1
2020-11-04T02:52:11.000Z
2020-11-04T02:52:11.000Z
src/semseg/data/potsdam.py
Suerte412/SemSeg
46515f36291bb7e068ceb1b455fe1fc4a26842ef
[ "Apache-2.0" ]
null
null
null
src/semseg/data/potsdam.py
Suerte412/SemSeg
46515f36291bb7e068ceb1b455fe1fc4a26842ef
[ "Apache-2.0" ]
null
null
null
from os.path import join import numpy as np import os from .isprs import IsprsDataset from .generators import FileGenerator, TRAIN, VALIDATION, TEST from .utils import ( save_img, load_img, get_img_size, compute_ndvi, _makedirs, save_numpy_array) POTSDAM = 'potsdam' PROCESSED_POTSDAM = 'processed_potsdam' ...
39.030812
132
0.599756
from os.path import join import numpy as np import os from .isprs import IsprsDataset from .generators import FileGenerator, TRAIN, VALIDATION, TEST from .utils import ( save_img, load_img, get_img_size, compute_ndvi, _makedirs, save_numpy_array) POTSDAM = 'potsdam' PROCESSED_POTSDAM = 'processed_potsdam' ...
true
true
f7fe275300e90e66a07aab6311b94bd08cc6f698
11,713
py
Python
samtranslator/intrinsics/resolver.py
eugeniosu/serverless-application-model
d93e15232a1921fa51667389d83aeabbf1ff72d3
[ "Apache-2.0" ]
2
2019-06-04T02:05:28.000Z
2019-06-16T14:17:08.000Z
samtranslator/intrinsics/resolver.py
eugeniosu/serverless-application-model
d93e15232a1921fa51667389d83aeabbf1ff72d3
[ "Apache-2.0" ]
6
2020-09-07T16:12:04.000Z
2022-03-12T00:04:12.000Z
samtranslator/intrinsics/resolver.py
eugeniosu/serverless-application-model
d93e15232a1921fa51667389d83aeabbf1ff72d3
[ "Apache-2.0" ]
15
2019-05-27T01:04:30.000Z
2021-10-01T05:54:45.000Z
# Help resolve intrinsic functions from samtranslator.intrinsics.actions import Action, SubAction, RefAction, GetAttAction # All intrinsics are supported by default DEFAULT_SUPPORTED_INTRINSICS = {action.intrinsic_name: action() for action in [RefAction, SubAction, GetAttAction]} class IntrinsicsResolver(object): ...
52.524664
120
0.708273
from samtranslator.intrinsics.actions import Action, SubAction, RefAction, GetAttAction DEFAULT_SUPPORTED_INTRINSICS = {action.intrinsic_name: action() for action in [RefAction, SubAction, GetAttAction]} class IntrinsicsResolver(object): def __init__(self, parameters, supported_intrinsics=DEFAULT_SUPPORTED_I...
true
true
f7fe28b0be00eae6a0bd98fff823e1a97f37ce7b
973
py
Python
script/feedback_js_sqli.py
bingpo/dedecmscan
879470f51a22f1f544b469d80fd2a88d692f116d
[ "Apache-2.0" ]
751
2019-08-16T06:44:25.000Z
2022-03-30T01:57:53.000Z
script/feedback_js_sqli.py
W-Peter/dedecmscan
42bc196f49e2930490b8f336025540a3d8329e7a
[ "Apache-2.0" ]
2
2019-12-13T12:41:55.000Z
2020-12-10T07:17:17.000Z
script/feedback_js_sqli.py
W-Peter/dedecmscan
42bc196f49e2930490b8f336025540a3d8329e7a
[ "Apache-2.0" ]
143
2019-08-29T11:26:42.000Z
2022-03-30T06:54:47.000Z
import requests from termcolor import cprint class feedback_sqli: def __init__(self,url): self.url = url def feedcheck(self): headers = { "User-Agent": "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_8; en-us) AppleWebKit/534.50 (KHTML, like Gecko) Version/5.1 Safari/534.50" ...
37.423077
234
0.600206
import requests from termcolor import cprint class feedback_sqli: def __init__(self,url): self.url = url def feedcheck(self): headers = { "User-Agent": "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_8; en-us) AppleWebKit/534.50 (KHTML, like Gecko) Version/5.1 Safari/534.50" ...
true
true
f7fe292b5fc71d9d0955e11bbc9b24a3a19fad6e
1,072
py
Python
2019/problem06.py
wandrewjam/advent-of-code
3bad15e38e9b6b4983965a96a43c85250444e3d2
[ "MIT" ]
null
null
null
2019/problem06.py
wandrewjam/advent-of-code
3bad15e38e9b6b4983965a96a43c85250444e3d2
[ "MIT" ]
null
null
null
2019/problem06.py
wandrewjam/advent-of-code
3bad15e38e9b6b4983965a96a43c85250444e3d2
[ "MIT" ]
null
null
null
# https://adventofcode.com/2019/day/6 def load_file(filename: str) -> dict: with open(filename) as f: raw_orbits = f.readlines() orbits = dict() for line in raw_orbits: value, key = line[:-1].split(')') orbits[key] = value return orbits def get_lineage(parent: str, orbits: d...
22.333333
62
0.606343
def load_file(filename: str) -> dict: with open(filename) as f: raw_orbits = f.readlines() orbits = dict() for line in raw_orbits: value, key = line[:-1].split(')') orbits[key] = value return orbits def get_lineage(parent: str, orbits: dict) -> list: try: lineag...
true
true
f7fe2b523104b7e75b08768d6ffbdbfbb2eb4186
6,546
py
Python
lib/datasets/coco_train.py
wdd0225/RetinaNet-and-SSD-in-PyTorch-Detectron
4140e197e78dfd59c8f09dcd33e97f6040a0f39e
[ "MIT" ]
3
2019-01-26T08:59:30.000Z
2021-03-03T21:45:41.000Z
lib/datasets/coco_train.py
daijucug/RetinaNet-and-SSD-in-PyTorch-Detectron
4140e197e78dfd59c8f09dcd33e97f6040a0f39e
[ "MIT" ]
null
null
null
lib/datasets/coco_train.py
daijucug/RetinaNet-and-SSD-in-PyTorch-Detectron
4140e197e78dfd59c8f09dcd33e97f6040a0f39e
[ "MIT" ]
1
2019-03-26T12:51:37.000Z
2019-03-26T12:51:37.000Z
from lib.core import ssd_config as cfg import os import os.path as osp import sys import torch import torch.utils.data as data import torchvision.transforms as transforms import cv2 import numpy as np # def get_label_map(label_file): # label_map = {} # labels = open(label_file, 'r') # for line in labels: #...
38.05814
110
0.572563
from lib.core import ssd_config as cfg import os import os.path as osp import sys import torch import torch.utils.data as data import torchvision.transforms as transforms import cv2 import numpy as np def get_label_map(labels): label_map = {} for ids in labels: label_map[int(ids[0])] = int(ids[1...
true
true
f7fe2bcd3bdb9de5858cb8fa048e92dc5e5e6186
418
py
Python
tests/test_status_codes.py
ambrozic/http3
5442006a41f94a3e41186910d7a6e8546adf0f89
[ "BSD-3-Clause" ]
null
null
null
tests/test_status_codes.py
ambrozic/http3
5442006a41f94a3e41186910d7a6e8546adf0f89
[ "BSD-3-Clause" ]
null
null
null
tests/test_status_codes.py
ambrozic/http3
5442006a41f94a3e41186910d7a6e8546adf0f89
[ "BSD-3-Clause" ]
null
null
null
import http3 def test_status_code_as_int(): assert http3.codes.NOT_FOUND == 404 assert str(http3.codes.NOT_FOUND) == "404" def test_lowercase_status_code(): assert http3.codes.not_found == 404 def test_reason_phrase_for_status_code(): assert http3.codes.get_reason_phrase(404) == "Not Found" def ...
22
60
0.753589
import http3 def test_status_code_as_int(): assert http3.codes.NOT_FOUND == 404 assert str(http3.codes.NOT_FOUND) == "404" def test_lowercase_status_code(): assert http3.codes.not_found == 404 def test_reason_phrase_for_status_code(): assert http3.codes.get_reason_phrase(404) == "Not Found" def ...
true
true
f7fe2d8607bd560f589726b4e8444b0f89cc7a08
6,537
py
Python
experiments/tsp/tsp.py
TCatshoek/lstar
042b0ae3a0627db7a412c828f3752a9c30928ec1
[ "MIT" ]
2
2019-10-15T11:28:12.000Z
2021-01-28T15:14:09.000Z
experiments/tsp/tsp.py
TCatshoek/lstar
042b0ae3a0627db7a412c828f3752a9c30928ec1
[ "MIT" ]
null
null
null
experiments/tsp/tsp.py
TCatshoek/lstar
042b0ae3a0627db7a412c828f3752a9c30928ec1
[ "MIT" ]
null
null
null
import tempfile import numpy as np from graphviz import Digraph from equivalencecheckers.bruteforce import BFEquivalenceChecker #from experiments.tsp.tsplearner import TSPLearner from experiments.tsp.tsplearner import TSPLearner from learners.mealylearner import MealyLearner from suls.mealymachine import MealyState f...
32.522388
154
0.598287
import tempfile import numpy as np from graphviz import Digraph from equivalencecheckers.bruteforce import BFEquivalenceChecker from experiments.tsp.tsplearner import TSPLearner from learners.mealylearner import MealyLearner from suls.mealymachine import MealyState from suls.sul import SUL from teachers.teacher impo...
true
true
f7fe2e12189f5c7bd5c301d8cd6a29b000ff6951
4,352
py
Python
origin_check.py
mikispag/OriginCheck
b3bda26c382cdbfd78bddc11d99d6e8723255599
[ "MIT" ]
1
2020-08-19T06:53:24.000Z
2020-08-19T06:53:24.000Z
origin_check.py
mikispag/OriginCheck
b3bda26c382cdbfd78bddc11d99d6e8723255599
[ "MIT" ]
null
null
null
origin_check.py
mikispag/OriginCheck
b3bda26c382cdbfd78bddc11d99d6e8723255599
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import concurrent.futures import logging import requests from sys import argv, exit from urllib.parse import urlparse logging.basicConfig(level=logging.DEBUG) logger = logging.getLogger(__name__) HEADERS = { 'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_4) AppleWebKit/537....
39.563636
143
0.584789
import concurrent.futures import logging import requests from sys import argv, exit from urllib.parse import urlparse logging.basicConfig(level=logging.DEBUG) logger = logging.getLogger(__name__) HEADERS = { 'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_4) AppleWebKit/537.36 (KHTML, like Gecko)...
true
true
f7fe2e35e7fe155380db07b62cce34529780ec91
3,648
py
Python
cher2.py
acse-hz6818/Armageddon
de62affe0b3f08cd74090d5d5e9e3c0905c9c8ed
[ "MIT" ]
null
null
null
cher2.py
acse-hz6818/Armageddon
de62affe0b3f08cd74090d5d5e9e3c0905c9c8ed
[ "MIT" ]
null
null
null
cher2.py
acse-hz6818/Armageddon
de62affe0b3f08cd74090d5d5e9e3c0905c9c8ed
[ "MIT" ]
null
null
null
# pylint: disable=invalid-name """ Extension 3: Inversion to calculate the chern explosion Try different values of Y and r in order to find the ones that give a result closer to the data ------------------------- returns: a graphical output df with errors and parameters choosen """ import pandas as pd imp...
32.864865
157
0.623081
import pandas as pd import numpy as np import matplotlib.pylab as plt import scipy.interpolate as si import armageddon earth = armageddon.Planet() protoCEAtable = pd.read_csv(r'C:\Users\gc2016\OneDrive - Imperial College London\ACSE\ACSE-4.2\acse-4-armageddon-hygiea\data\ChelyabinskEnergyAltitude.csv') rc = ...
true
true
f7fe2f6fe8a9361a12505ab1363f6de686380d9d
315
py
Python
main.py
wasit7/lambda
cc68db2a1e692229ce98fab18e2fc170b69f9cbe
[ "MIT" ]
null
null
null
main.py
wasit7/lambda
cc68db2a1e692229ce98fab18e2fc170b69f9cbe
[ "MIT" ]
null
null
null
main.py
wasit7/lambda
cc68db2a1e692229ce98fab18e2fc170b69f9cbe
[ "MIT" ]
null
null
null
import numpy as np def myfunction(event=None, context=None): mylist=[ 'My name is Wasit', 'Rule the world!!', 'get data, process and turn on the switch', 'get data and predict your future', 'keep coding', ] return mylist[np.random.randint(0, len(mylist))] if __name__ == "__main__": print myfunction()
26.25
52
0.692063
import numpy as np def myfunction(event=None, context=None): mylist=[ 'My name is Wasit', 'Rule the world!!', 'get data, process and turn on the switch', 'get data and predict your future', 'keep coding', ] return mylist[np.random.randint(0, len(mylist))] if __name__ == "__main__": print myfunction()
false
true
f7fe2ff7ed6dd9492b444201a89b884b369cfd4c
6,635
py
Python
stix_shifter_modules/datadog/test/stix_transmission/test_datadog.py
priti-patil/stix-shifter
26954598fb79dde4506987388592ec391ff8a10b
[ "Apache-2.0" ]
33
2018-05-25T17:07:28.000Z
2019-09-30T10:08:53.000Z
stix_shifter_modules/datadog/test/stix_transmission/test_datadog.py
priti-patil/stix-shifter
26954598fb79dde4506987388592ec391ff8a10b
[ "Apache-2.0" ]
54
2018-06-01T18:17:24.000Z
2019-09-30T18:36:15.000Z
stix_shifter_modules/datadog/test/stix_transmission/test_datadog.py
subbyte/stix-shifter
36d71c172a5fc5b97d872e623753b0dd1bf4fe6c
[ "Apache-2.0" ]
37
2018-07-24T13:29:46.000Z
2019-09-29T19:06:27.000Z
import unittest from unittest.mock import patch from stix_shifter_modules.datadog.entry_point import EntryPoint from stix_shifter_utils.utils.error_response import ErrorCode class DatadogMockEvent(): def __init__(self, _data_store): self._data_store = _data_store class TestDatadogConnection(unittest.Tes...
48.07971
181
0.700528
import unittest from unittest.mock import patch from stix_shifter_modules.datadog.entry_point import EntryPoint from stix_shifter_utils.utils.error_response import ErrorCode class DatadogMockEvent(): def __init__(self, _data_store): self._data_store = _data_store class TestDatadogConnection(unittest.Tes...
true
true
f7fe30844529ac629a1ec24c31ef21c2ae2f0503
1,075
py
Python
tests/test_main.py
developmentseed/pydantic-ssm-settings
f8f7c5784a97e93d54c7ab056d6c959892429727
[ "MIT" ]
null
null
null
tests/test_main.py
developmentseed/pydantic-ssm-settings
f8f7c5784a97e93d54c7ab056d6c959892429727
[ "MIT" ]
null
null
null
tests/test_main.py
developmentseed/pydantic-ssm-settings
f8f7c5784a97e93d54c7ab056d6c959892429727
[ "MIT" ]
null
null
null
import logging import pytest from pydantic import BaseSettings from pydantic_ssm_settings import AwsSsmSourceConfig logger = logging.getLogger("pydantic_ssm_settings") logger.setLevel(logging.DEBUG) class SimpleSettings(BaseSettings): foo: str class Config(AwsSsmSourceConfig): ... class IntSetti...
22.395833
71
0.72093
import logging import pytest from pydantic import BaseSettings from pydantic_ssm_settings import AwsSsmSourceConfig logger = logging.getLogger("pydantic_ssm_settings") logger.setLevel(logging.DEBUG) class SimpleSettings(BaseSettings): foo: str class Config(AwsSsmSourceConfig): ... class IntSetti...
true
true
f7fe3177c09f5518ffa0c762ee12c3cbcb419795
686
py
Python
3.Object.Oriented.Programming/13.defineDafultValues.py
bhattvishal/programming-learning-python
78498bfbe7c1c7b1bda53756ca8552ab30fbf538
[ "MIT" ]
1
2020-11-26T11:06:56.000Z
2020-11-26T11:06:56.000Z
3.Object.Oriented.Programming/13.defineDafultValues.py
bhattvishal/programming-learning-python
78498bfbe7c1c7b1bda53756ca8552ab30fbf538
[ "MIT" ]
null
null
null
3.Object.Oriented.Programming/13.defineDafultValues.py
bhattvishal/programming-learning-python
78498bfbe7c1c7b1bda53756ca8552ab30fbf538
[ "MIT" ]
null
null
null
# KEEP IN MIND: Attributes with no Default Values must come first from dataclasses import dataclass, field import random def getDiscount(): return float(random.randrange(20, 40)) @dataclass class Book: pages: int title: str = "No Title" author: str = "No Author" price: float = field(defa...
27.44
98
0.686589
from dataclasses import dataclass, field import random def getDiscount(): return float(random.randrange(20, 40)) @dataclass class Book: pages: int title: str = "No Title" author: str = "No Author" price: float = field(default=10.0) discount: float = field(default_factory=getDiscoun...
true
true
f7fe324cb814a1ae68efe73a1fa569f7ef9aa215
262
py
Python
11-20/20_factorial_digit_sum.py
sebranly/project-euler
9e944126d936db92962ab66e9968bab57aa1af88
[ "MIT" ]
null
null
null
11-20/20_factorial_digit_sum.py
sebranly/project-euler
9e944126d936db92962ab66e9968bab57aa1af88
[ "MIT" ]
null
null
null
11-20/20_factorial_digit_sum.py
sebranly/project-euler
9e944126d936db92962ab66e9968bab57aa1af88
[ "MIT" ]
null
null
null
def factorial(number, accumulator = 1): if (number == 0): return accumulator return factorial(number - 1, accumulator * number) result = factorial(100) sum_digits = 0 for digit in str(result): sum_digits += int(digit) print(sum_digits)
21.833333
54
0.671756
def factorial(number, accumulator = 1): if (number == 0): return accumulator return factorial(number - 1, accumulator * number) result = factorial(100) sum_digits = 0 for digit in str(result): sum_digits += int(digit) print(sum_digits)
true
true
f7fe33100ae3d7599678d5a66a71858f5a4fd2c8
5,622
py
Python
tensor2tensor/utils/learning_rate.py
sivaramakrishna7/tensor2tensor
eb0118d3f459913133e3d68a96944480a928bff1
[ "Apache-2.0" ]
null
null
null
tensor2tensor/utils/learning_rate.py
sivaramakrishna7/tensor2tensor
eb0118d3f459913133e3d68a96944480a928bff1
[ "Apache-2.0" ]
null
null
null
tensor2tensor/utils/learning_rate.py
sivaramakrishna7/tensor2tensor
eb0118d3f459913133e3d68a96944480a928bff1
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # Copyright 2018 The Tensor2Tensor Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable...
35.808917
77
0.721096
from __future__ import absolute_import from __future__ import division from __future__ import print_function import numpy as np import tensorflow as tf def learning_rate_factor(name, step_num, hparams): if name == "constant": return hparams.learning_rate_constant elif name == "linear_warmup...
true
true
f7fe33ddbc3fa236767378e2122a73a94d0135f6
48,626
py
Python
oneflow/python/eager/vm_util.py
zhouyuegit/oneflow
ddb6ad7fc43b867357394c3d3f0176f4e81cc8ef
[ "Apache-2.0" ]
null
null
null
oneflow/python/eager/vm_util.py
zhouyuegit/oneflow
ddb6ad7fc43b867357394c3d3f0176f4e81cc8ef
[ "Apache-2.0" ]
null
null
null
oneflow/python/eager/vm_util.py
zhouyuegit/oneflow
ddb6ad7fc43b867357394c3d3f0176f4e81cc8ef
[ "Apache-2.0" ]
null
null
null
""" Copyright 2020 The OneFlow Authors. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agr...
43.338681
101
0.721342
from __future__ import absolute_import import re from contextlib import contextmanager import oneflow.core.eager.eager_symbol_pb2 as eager_symbol_util import oneflow.core.job.placement_pb2 as placement_pb_util import oneflow.core.operator.op_conf_pb2 as op_conf_util import oneflow.core.operator.op_attribute_pb2 as op...
true
true
f7fe33f7e1b808437310c413e4e46ab5f213e9bb
7,039
py
Python
examples/docs/simple_bot_mult_res.py
eirrgang/radical.pilot
ceccd1867dd172935d602ff4c33a5ed4467e0dc8
[ "MIT" ]
1
2021-11-07T04:51:30.000Z
2021-11-07T04:51:30.000Z
examples/docs/simple_bot_mult_res.py
eirrgang/radical.pilot
ceccd1867dd172935d602ff4c33a5ed4467e0dc8
[ "MIT" ]
null
null
null
examples/docs/simple_bot_mult_res.py
eirrgang/radical.pilot
ceccd1867dd172935d602ff4c33a5ed4467e0dc8
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 __copyright__ = "Copyright 2014-2015, http://radical.rutgers.edu" __license__ = "MIT" import sys import radical.pilot as rp """ DESCRIPTION: Tutorial 1: A Simple Workload consisting of a Bag-of-Tasks submitted to multiple machines """ # READ: The RADICAL-Pilot ...
34.504902
81
0.588862
__copyright__ = "Copyright 2014-2015, http://radical.rutgers.edu" __license__ = "MIT" import sys import radical.pilot as rp def pilot_state_cb (pilot, state): if not pilot: return print("[Callback]: Pilot '%s' state: %s." % (pilot.uid, state)) if state == rp.FAILED: sys.e...
true
true
f7fe349e37116aa645dec464fbddf1eedd53ec12
39,111
py
Python
src/practice_problem1.py
fultoncn/14-Exam2Practice
52206d105c7368a5ca548a3fe4afe896e2ac09d4
[ "MIT" ]
null
null
null
src/practice_problem1.py
fultoncn/14-Exam2Practice
52206d105c7368a5ca548a3fe4afe896e2ac09d4
[ "MIT" ]
null
null
null
src/practice_problem1.py
fultoncn/14-Exam2Practice
52206d105c7368a5ca548a3fe4afe896e2ac09d4
[ "MIT" ]
null
null
null
""" PRACTICE Test 2, practice_problem 1. This problem provides practice at: *** IMPLEMENTING CLASSES. *** Authors: David Mutchler, Valerie Galluzzi, Mark Hays, Amanda Stouder, their colleagues and Colleen Fulton. """ # DONE: 1. PUT YOUR NAME IN THE ABOVE LINE. ##########################################...
38.082765
83
0.535885
""" PRACTICE Test 2, practice_problem 1. This problem provides practice at: *** IMPLEMENTING CLASSES. *** Authors: David Mutchler, Valerie Galluzzi, Mark Hays, Amanda Stouder, their colleagues and Colleen Fulton. """ Box What goes out: Returns a new Box whose: -- Contents...
false
true
f7fe359b6b90342b5dcba1521f6537096671ace7
5,136
py
Python
applications/link/modules/api_methods.py
link-money-dev/link-api-web-service
3da226c7115ee4267f8346620029b710b9987e74
[ "BSD-3-Clause" ]
null
null
null
applications/link/modules/api_methods.py
link-money-dev/link-api-web-service
3da226c7115ee4267f8346620029b710b9987e74
[ "BSD-3-Clause" ]
1
2021-06-01T22:32:25.000Z
2021-06-01T22:32:25.000Z
applications/watcher/modules/api_methods.py
link-money-dev/link-api-web-service
3da226c7115ee4267f8346620029b710b9987e74
[ "BSD-3-Clause" ]
null
null
null
import check import requests import json import error from db import PGManager def get_balance(LinkAddress, constant): BASE_URL = constant.HORIZON_BASE_URL validity = check.check_validity_of_address(LinkAddress) if validity == False: raise error.APIError('Account is invalid') else: # i...
48
178
0.597936
import check import requests import json import error from db import PGManager def get_balance(LinkAddress, constant): BASE_URL = constant.HORIZON_BASE_URL validity = check.check_validity_of_address(LinkAddress) if validity == False: raise error.APIError('Account is invalid') else: ...
true
true
f7fe35e175d4819b012844825fcdc82bf7ed6031
8,655
py
Python
intersight/model/kvm_tunnel_list_all_of.py
CiscoDevNet/intersight-python
04b721f37c3044646a91c185c7259edfb991557a
[ "Apache-2.0" ]
5
2021-12-16T15:13:32.000Z
2022-03-29T16:09:54.000Z
intersight/model/kvm_tunnel_list_all_of.py
CiscoDevNet/intersight-python
04b721f37c3044646a91c185c7259edfb991557a
[ "Apache-2.0" ]
4
2022-01-25T19:05:51.000Z
2022-03-29T20:18:37.000Z
intersight/model/kvm_tunnel_list_all_of.py
CiscoDevNet/intersight-python
04b721f37c3044646a91c185c7259edfb991557a
[ "Apache-2.0" ]
2
2020-07-07T15:01:08.000Z
2022-01-31T04:27:35.000Z
""" Cisco Intersight Cisco Intersight is a management platform delivered as a service with embedded analytics for your Cisco and 3rd party IT infrastructure. This platform offers an intelligent level of management that enables IT organizations to analyze, simplify, and automate their environments in more advan...
49.176136
1,678
0.636511
import re import sys from intersight.model_utils import ( ApiTypeError, ModelComposed, ModelNormal, ModelSimple, cached_property, change_keys_js_to_python, convert_js_args_to_python_args, date, datetime, file_type, none_type, validate_get_composed_info, ) def la...
true
true
f7fe35f91a032c4e5f134545990176ab89c7acf6
4,228
py
Python
bokeh/_testing/plugins/selenium.py
kinghows/bokeh
aeb7abc1dbe2b67ce0f4422838a96fb8362c52c7
[ "BSD-3-Clause" ]
1
2018-11-14T19:08:18.000Z
2018-11-14T19:08:18.000Z
bokeh/_testing/plugins/selenium.py
kinghows/bokeh
aeb7abc1dbe2b67ce0f4422838a96fb8362c52c7
[ "BSD-3-Clause" ]
1
2021-05-09T02:45:17.000Z
2021-05-09T02:45:17.000Z
bokeh/_testing/plugins/selenium.py
kinghows/bokeh
aeb7abc1dbe2b67ce0f4422838a96fb8362c52c7
[ "BSD-3-Clause" ]
1
2020-06-17T05:47:16.000Z
2020-06-17T05:47:16.000Z
#----------------------------------------------------------------------------- # Copyright (c) 2012 - 2017, Anaconda, Inc. All rights reserved. # # Powered by the Bokeh Development Team. # # The full license is in the file LICENSE.txt, distributed with this software. #---------------------------------------------------...
33.824
126
0.469016
from __future__ import absolute_import, division, print_function, unicode_literals import logging log = logging.getLogger(__name__) from warnings import warn import pytest from selenium import webdriver def pytest_report_collectionfinish(config, startdir, items): driver = config.geto...
true
true
f7fe360ae492e2e48320e076e35a434343e19ad2
572
py
Python
apps/base/apis/permissions.py
summerthe/summers_api
db345db7c0ed88c361ea944b96e26c7241ac6ce2
[ "MIT" ]
null
null
null
apps/base/apis/permissions.py
summerthe/summers_api
db345db7c0ed88c361ea944b96e26c7241ac6ce2
[ "MIT" ]
4
2022-03-09T09:34:28.000Z
2022-03-16T09:44:10.000Z
apps/base/apis/permissions.py
summerthe/summers_api
db345db7c0ed88c361ea944b96e26c7241ac6ce2
[ "MIT" ]
null
null
null
from django.views import View from rest_framework.permissions import BasePermission from rest_framework.request import Request class AppOwnPermission(BasePermission): def has_permission(self, request: Request, view: View) -> bool: """Checks if App-Own key is in request header, App-Own key will be passed f...
26
105
0.624126
from django.views import View from rest_framework.permissions import BasePermission from rest_framework.request import Request class AppOwnPermission(BasePermission): def has_permission(self, request: Request, view: View) -> bool: if "App-Own" in request.headers: return True return Fal...
true
true
f7fe36bc6dd8ff2d7c073f7e78d53bb3aa775aea
526
py
Python
Uni_To_Zg/main.py
EiEiKyaw/Right
710665ce0ee132f56249530cf1389b4b7fabb9be
[ "MIT" ]
null
null
null
Uni_To_Zg/main.py
EiEiKyaw/Right
710665ce0ee132f56249530cf1389b4b7fabb9be
[ "MIT" ]
null
null
null
Uni_To_Zg/main.py
EiEiKyaw/Right
710665ce0ee132f56249530cf1389b4b7fabb9be
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Usage: main.py inputfilename.ext outputfilename.ext # Example: main.py zawgyi.txt unicode.txt import codecs import Uni_To_Zg import sys input_file_name = sys.argv[1] output_file_name = sys.argv[2] input_file = codecs.open(input_file_name,encoding='utf-8') output_file = codecs.open(output_fi...
23.909091
70
0.768061
import codecs import Uni_To_Zg import sys input_file_name = sys.argv[1] output_file_name = sys.argv[2] input_file = codecs.open(input_file_name,encoding='utf-8') output_file = codecs.open(output_file_name,encoding='utf-8', mode='w') for input_line in input_file: input_line = Uni_To_Zg.convert(input_line) out...
true
true
f7fe36c9977438b141069682e219cfc0b80a53b9
20,454
py
Python
.venv/lib/python3.7/site-packages/nbformat/sign.py
ITCRStevenLPZ/Proyecto2-Analisis-de-Algoritmos
4acdbc423428fb2e0068720add69e7870c87929a
[ "Apache-2.0" ]
76
2020-07-06T14:44:05.000Z
2022-02-14T15:30:21.000Z
.venv/lib/python3.7/site-packages/nbformat/sign.py
ITCRStevenLPZ/Proyecto2-Analisis-de-Algoritmos
4acdbc423428fb2e0068720add69e7870c87929a
[ "Apache-2.0" ]
24
2020-03-25T19:35:43.000Z
2022-02-10T11:46:50.000Z
.venv/lib/python3.7/site-packages/nbformat/sign.py
ITCRStevenLPZ/Proyecto2-Analisis-de-Algoritmos
4acdbc423428fb2e0068720add69e7870c87929a
[ "Apache-2.0" ]
11
2019-01-21T17:51:48.000Z
2021-08-10T07:04:33.000Z
"""Utilities for signing notebooks""" # Copyright (c) IPython Development Team. # Distributed under the terms of the Modified BSD License. from collections import OrderedDict from contextlib import contextmanager from datetime import datetime import hashlib from hmac import HMAC import io import os import sys try: ...
33.531148
111
0.603598
from collections import OrderedDict from contextlib import contextmanager from datetime import datetime import hashlib from hmac import HMAC import io import os import sys try: import sqlite3 except ImportError: try: from pysqlite2 import dbapi2 as sqlite3 except ImportError: sqlite3 = ...
true
true
f7fe3746fa2700f7f701579a9782ee6e927ce0d1
743
py
Python
consol_real_ensemble.py
SudeepDasari/video_prediction-1
ef0953b514aa1b7a1f5e96fd30aebef01334fb2d
[ "MIT" ]
null
null
null
consol_real_ensemble.py
SudeepDasari/video_prediction-1
ef0953b514aa1b7a1f5e96fd30aebef01334fb2d
[ "MIT" ]
null
null
null
consol_real_ensemble.py
SudeepDasari/video_prediction-1
ef0953b514aa1b7a1f5e96fd30aebef01334fb2d
[ "MIT" ]
null
null
null
import numpy as np import argparse import imageio if __name__ == '__main__': parser = argparse.ArgumentParser() parser.add_argument('--log_dirs', nargs='+') parser.add_argument('--max_num', type=int, default=32) args = parser.parse_args() dirs = args.log_dirs big_numpy = None for area in ...
29.72
84
0.643338
import numpy as np import argparse import imageio if __name__ == '__main__': parser = argparse.ArgumentParser() parser.add_argument('--log_dirs', nargs='+') parser.add_argument('--max_num', type=int, default=32) args = parser.parse_args() dirs = args.log_dirs big_numpy = None for area in ...
true
true
f7fe37b154d92154ecaf98c31c103bfee545ca07
443
py
Python
waters/migrations/0003_product_product_image.py
chymdyugah/water
fa5da223e57100e6d2853c763afe5e89187e249d
[ "MIT" ]
null
null
null
waters/migrations/0003_product_product_image.py
chymdyugah/water
fa5da223e57100e6d2853c763afe5e89187e249d
[ "MIT" ]
null
null
null
waters/migrations/0003_product_product_image.py
chymdyugah/water
fa5da223e57100e6d2853c763afe5e89187e249d
[ "MIT" ]
null
null
null
# Generated by Django 2.2.2 on 2020-05-14 20:46 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('waters', '0002_auto_20200514_2140'), ] operations = [ migrations.AddField( model_name='product', name='product_image...
22.15
66
0.598194
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('waters', '0002_auto_20200514_2140'), ] operations = [ migrations.AddField( model_name='product', name='product_image', field=models.FileField(default='...
true
true
f7fe38a3c4f946cbf408f5bd3abd0d3e5a12fdbd
1,902
py
Python
Visualize-Data-using-Matplotlib/code.py
nagnath001/ga-learner-dsmp-repo
7035fd2ebe967182a44011dde59cb8ae411badb6
[ "MIT" ]
null
null
null
Visualize-Data-using-Matplotlib/code.py
nagnath001/ga-learner-dsmp-repo
7035fd2ebe967182a44011dde59cb8ae411badb6
[ "MIT" ]
null
null
null
Visualize-Data-using-Matplotlib/code.py
nagnath001/ga-learner-dsmp-repo
7035fd2ebe967182a44011dde59cb8ae411badb6
[ "MIT" ]
null
null
null
# -------------- #Importing header files import pandas as pd import numpy as np import matplotlib.pyplot as plt #Code starts here # load data data = pd.read_csv(path) loan_status=data.Loan_Status.value_counts() plt.bar(loan_status.index,loan_status) plt.show() # -------------- #Code starts here #Plotting ...
22.642857
72
0.704522
import pandas as pd import numpy as np import matplotlib.pyplot as plt data = pd.read_csv(path) loan_status=data.Loan_Status.value_counts() plt.bar(loan_status.index,loan_status) plt.show() property_and_loan=data.groupby(['Property_Area', 'Loan_Status']) property_and_loan=property_and_loan.size().unst...
true
true
f7fe38c9a4b8c5796670a8aa33b5cb1b8bbd7c39
5,246
py
Python
src/jetson/Sensors/sensors_simple.py
ichalkiad/VW_challenge
333222010ecf3d1ca4a0e181239f761c975453e9
[ "Apache-2.0" ]
1
2017-08-16T08:42:49.000Z
2017-08-16T08:42:49.000Z
src/jetson/Sensors/sensors_simple.py
ichalkiad/VW_challenge
333222010ecf3d1ca4a0e181239f761c975453e9
[ "Apache-2.0" ]
4
2017-08-09T23:01:30.000Z
2017-08-24T16:44:13.000Z
src/jetson/Sensors/sensors_simple.py
yhalk/vw_challenge_ECR
c1ff50070d0f7367ccfbf473c69e90fd2be5e85e
[ "Apache-2.0" ]
null
null
null
import paho.mqtt.client as mqtt import ev3dev.ev3 as ev3 import ctypes import numpy as np import sys import cv2 from Sensors.mpu6050.mpu6050 import MPU6050 import smbus from Sensors.odometry import Odometry import sys, serial from serial.tools import list_ports class Sensor(object): def __init__(self, *args, **kwa...
43
280
0.609989
import paho.mqtt.client as mqtt import ev3dev.ev3 as ev3 import ctypes import numpy as np import sys import cv2 from Sensors.mpu6050.mpu6050 import MPU6050 import smbus from Sensors.odometry import Odometry import sys, serial from serial.tools import list_ports class Sensor(object): def __init__(self, *args, **kwa...
true
true
f7fe397f1d17d0aeaa6c3cb6c30e4e1a3fe8ff22
4,365
py
Python
AXF/settings.example.py
luomantic/AiXianFeng
52723fb764889f583c010f9889313b6f50cbc3bd
[ "MIT" ]
null
null
null
AXF/settings.example.py
luomantic/AiXianFeng
52723fb764889f583c010f9889313b6f50cbc3bd
[ "MIT" ]
1
2019-03-01T12:00:36.000Z
2019-03-01T12:01:12.000Z
AXF/settings.example.py
luomantic/AiXianFeng
52723fb764889f583c010f9889313b6f50cbc3bd
[ "MIT" ]
null
null
null
""" Django settings for AXF project. Generated by 'django-admin startproject' using Django 2.1.7. For more information on this file, see https://docs.djangoproject.com/en/2.1/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/2.1/ref/settings/ """ import os # Bui...
29.1
91
0.701947
import os BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) SECRET_KEY = '%k3*q-^xjfzb!o&qc8n4f5h9is)%=k9v+h_(-(*j_af$$ca7lq' DEBUG = True ALLOWED_HOSTS = ['*'] # Application definition INSTALLED_APPS = [ 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.conten...
true
true
f7fe3a23a78b1a94c3414e3554c02a7be8a784bc
1,924
py
Python
api/autotest/testcodegen/actions/__init__.py
P-JIANGH/autonium
99a7de401c378e5e546727e0f920e11ce7e24a15
[ "Apache-2.0" ]
null
null
null
api/autotest/testcodegen/actions/__init__.py
P-JIANGH/autonium
99a7de401c378e5e546727e0f920e11ce7e24a15
[ "Apache-2.0" ]
null
null
null
api/autotest/testcodegen/actions/__init__.py
P-JIANGH/autonium
99a7de401c378e5e546727e0f920e11ce7e24a15
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 __author__ = 'JIANGH' __all__ = [ 'judge', 'event', 'find', 'excel', 'database', 'ModeType', 'Args', 'get_action', 'get_actions_def' ] class ModeType(): """选择器模式枚举""" ID = 'id' CLASS = 'class' CSS_SELECTOR = 'css' XPATH = 'xpath' NAME = 'name' INNER_TEXT = 'text' PARTIAL_TEXT = '...
26
132
0.673597
__author__ = 'JIANGH' __all__ = [ 'judge', 'event', 'find', 'excel', 'database', 'ModeType', 'Args', 'get_action', 'get_actions_def' ] class ModeType(): ID = 'id' CLASS = 'class' CSS_SELECTOR = 'css' XPATH = 'xpath' NAME = 'name' INNER_TEXT = 'text' PARTIAL_TEXT = 'partial_text' class Args(obje...
true
true
f7fe3ad7af2bbe7af74d29097983bfe987f4499b
6,505
py
Python
twitch/iterators.py
Fozar/twitch-tools
9b9dac699082101d3e8c65cbbed8256d677d3d93
[ "MIT" ]
null
null
null
twitch/iterators.py
Fozar/twitch-tools
9b9dac699082101d3e8c65cbbed8256d677d3d93
[ "MIT" ]
null
null
null
twitch/iterators.py
Fozar/twitch-tools
9b9dac699082101d3e8c65cbbed8256d677d3d93
[ "MIT" ]
null
null
null
# MIT License # # Copyright (c) 2020 Fozar # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, ...
33.358974
98
0.625365
import asyncio from abc import abstractmethod from collections import AsyncIterator from itertools import zip_longest from typing import Any, Optional, List from .errors import NoMoreItems from .game import Game from .stream import Stream from .user import User from .utils import chunks __all__ =...
true
true
f7fe3d6562253ccf809ddee89d15a6f59dae2f68
295
py
Python
users/admin.py
dhanupandey12/Blog
fcd274b7249c255786b46cf81d6e949a903e9a53
[ "MIT" ]
null
null
null
users/admin.py
dhanupandey12/Blog
fcd274b7249c255786b46cf81d6e949a903e9a53
[ "MIT" ]
null
null
null
users/admin.py
dhanupandey12/Blog
fcd274b7249c255786b46cf81d6e949a903e9a53
[ "MIT" ]
null
null
null
from django.contrib import admin from .models import Profile,MessageData,Notifications,Following,Followers # Register your models here. admin.site.register(Profile) admin.site.register(MessageData) admin.site.register(Notifications) admin.site.register(Following) admin.site.register(Followers)
32.777778
73
0.844068
from django.contrib import admin from .models import Profile,MessageData,Notifications,Following,Followers admin.site.register(Profile) admin.site.register(MessageData) admin.site.register(Notifications) admin.site.register(Following) admin.site.register(Followers)
true
true
f7fe3de5dabdebe255210a7b6247809dbd70d10b
10,560
py
Python
tensorflow/contrib/autograph/impl/api.py
elielhojman/tensorflow
163aae337c875efce2518c3cd0fecb61968fe408
[ "Apache-2.0" ]
4
2019-04-12T00:49:38.000Z
2020-06-12T07:12:00.000Z
tensorflow/contrib/autograph/impl/api.py
AKIRA-MIYAKE/tensorflow
89e06304aad35bfb019a8c10f39fc1ead83e0f99
[ "Apache-2.0" ]
4
2019-08-14T22:32:51.000Z
2020-03-09T14:59:18.000Z
tensorflow/contrib/autograph/impl/api.py
AKIRA-MIYAKE/tensorflow
89e06304aad35bfb019a8c10f39fc1ead83e0f99
[ "Apache-2.0" ]
1
2020-03-31T22:04:40.000Z
2020-03-31T22:04:40.000Z
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
33.52381
80
0.711269
from __future__ import absolute_import from __future__ import division from __future__ import print_function from functools import wraps from enum import Enum import gast import six from tensorflow.contrib.autograph.core import config from tensorflow.contrib.autograph.core import converter from ten...
true
true
f7fe3df397864ad714beb62212fe0d2ad1a5aaa3
5,937
py
Python
src/ebay_rest/api/sell_analytics/models/metadata_header.py
gbm001/ebay_rest
077d3478423ccd80ff35e0361821d6a11180bc54
[ "MIT" ]
3
2021-12-12T04:28:03.000Z
2022-03-10T03:29:18.000Z
src/ebay_rest/api/sell_analytics/models/metadata_header.py
jdavv/ebay_rest
20fc88c6aefdae9ab90f9c1330e79abddcd750cd
[ "MIT" ]
33
2021-06-16T20:44:36.000Z
2022-03-30T14:55:06.000Z
src/ebay_rest/api/sell_analytics/models/metadata_header.py
jdavv/ebay_rest
20fc88c6aefdae9ab90f9c1330e79abddcd750cd
[ "MIT" ]
7
2021-06-03T09:30:23.000Z
2022-03-08T19:51:33.000Z
# coding: utf-8 """ Seller Service Metrics API The <i>Analytics API</i> provides data and information about a seller and their eBay business. <br><br>The resources and methods in this API let sellers review information on their listing performance, metrics on their customer service performance, and details...
42.106383
1,272
0.623547
import pprint import re import six class MetadataHeader(object): swagger_types = { 'key': 'str', 'metadata_keys': 'list[Definition]' } attribute_map = { 'key': 'key', 'metadata_keys': 'metadataKeys' } def __init__(self, key=None, metadata_keys=None): ...
true
true
f7fe3e4ad42116f197de8e648d46269e05cf320b
19,429
py
Python
tools/Polygraphy/polygraphy/backend/trt/util.py
wjc852456/TensorRT
c7c15e7547022298ec3e586e8bc8a3d0cf7166fe
[ "Apache-2.0" ]
null
null
null
tools/Polygraphy/polygraphy/backend/trt/util.py
wjc852456/TensorRT
c7c15e7547022298ec3e586e8bc8a3d0cf7166fe
[ "Apache-2.0" ]
null
null
null
tools/Polygraphy/polygraphy/backend/trt/util.py
wjc852456/TensorRT
c7c15e7547022298ec3e586e8bc8a3d0cf7166fe
[ "Apache-2.0" ]
1
2022-03-29T12:39:29.000Z
2022-03-29T12:39:29.000Z
# # Copyright (c) 2021, NVIDIA CORPORATION. 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 appl...
38.246063
127
0.656081
import contextlib from polygraphy import config, mod, util from polygraphy.common import TensorMetadata from polygraphy.logger import G_LOGGER, LogMode trt = mod.lazy_import("tensorrt") np = mod.lazy_import("numpy") TRT_LOGGER = None @mod.export() def get_trt_logger(): global TRT_LOGGER if ...
true
true
f7fe3f38008fbe8da34a6149bbdff2bab6ef6e4d
102
py
Python
erica/domain/DomainModule.py
punknoir101/erica-1
675a6280d38ca5b56946af6f3ed7e295ba896db0
[ "MIT" ]
3
2022-01-31T15:17:17.000Z
2022-03-01T16:15:47.000Z
erica/domain/DomainModule.py
punknoir101/erica-1
675a6280d38ca5b56946af6f3ed7e295ba896db0
[ "MIT" ]
59
2022-01-31T14:04:20.000Z
2022-03-31T20:08:47.000Z
erica/domain/DomainModule.py
punknoir101/erica-1
675a6280d38ca5b56946af6f3ed7e295ba896db0
[ "MIT" ]
1
2022-03-10T09:24:28.000Z
2022-03-10T09:24:28.000Z
from opyoid import Module class DomainModule(Module): def configure(self) -> None: pass
14.571429
32
0.676471
from opyoid import Module class DomainModule(Module): def configure(self) -> None: pass
true
true
f7fe3f61e2cb49a84cc03e59dba550b1fe4a85de
10,793
py
Python
tests/attacks/inference/test_membership_inference.py
meghana-sesetti/adversarial-robustness-toolbox
6a5ce9e4142734ad9004e5c093ef8fa754ea6b39
[ "MIT" ]
1
2020-12-26T10:02:05.000Z
2020-12-26T10:02:05.000Z
tests/attacks/inference/test_membership_inference.py
Tikquuss/adversarial-robustness-toolbox
62ffe7c951d8a60d49a9ea6ac7b04aa4432a3fb7
[ "MIT" ]
33
2021-01-18T08:30:34.000Z
2022-03-11T07:05:13.000Z
tests/attacks/inference/test_membership_inference.py
Tikquuss/adversarial-robustness-toolbox
62ffe7c951d8a60d49a9ea6ac7b04aa4432a3fb7
[ "MIT" ]
1
2020-09-28T12:58:01.000Z
2020-09-28T12:58:01.000Z
# MIT License # # Copyright (C) The Adversarial Robustness Toolbox (ART) Authors 2020 # # Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated # documentation files (the "Software"), to deal in the Software without restriction, including without limitation the # r...
47.337719
120
0.77995
from __future__ import absolute_import, division, print_function, unicode_literals import logging import pytest import keras from art.attacks.inference.membership_inference.black_box import MembershipInferenceBlackBox from art.attacks.inference.membership_inference.black_box_rule_based import Member...
true
true
f7fe3f625de60e920278fa9877a8710f2d833150
1,390
py
Python
ktrade/client.py
krosstrading/ktrade
13ef132772f22acfac05ed60a2fcfbb1f34c2615
[ "Apache-2.0" ]
null
null
null
ktrade/client.py
krosstrading/ktrade
13ef132772f22acfac05ed60a2fcfbb1f34c2615
[ "Apache-2.0" ]
null
null
null
ktrade/client.py
krosstrading/ktrade
13ef132772f22acfac05ed60a2fcfbb1f34c2615
[ "Apache-2.0" ]
null
null
null
import asyncio from .protocol import stock_pb2 from . import providerdict class KrossClient: def __init__(self, socket, node): self.sock = socket self.node = node self.write_lock = asyncio.Lock() async def send_object(self, data): async with self.write_lock: await...
30.888889
77
0.560432
import asyncio from .protocol import stock_pb2 from . import providerdict class KrossClient: def __init__(self, socket, node): self.sock = socket self.node = node self.write_lock = asyncio.Lock() async def send_object(self, data): async with self.write_lock: await...
true
true
f7fe3f64ab7d9812e1dfd30423018d4e5b38e582
11,395
py
Python
sdf/analytics.py
drgmk/sdf
a44e66a82f876dda079686b32c767370276c38a1
[ "MIT" ]
1
2020-07-01T15:55:16.000Z
2020-07-01T15:55:16.000Z
sdf/analytics.py
drgmk/sdf
a44e66a82f876dda079686b32c767370276c38a1
[ "MIT" ]
4
2017-03-28T19:18:09.000Z
2021-09-21T08:17:45.000Z
sdf/analytics.py
drgmk/sdf
a44e66a82f876dda079686b32c767370276c38a1
[ "MIT" ]
1
2020-07-13T19:39:15.000Z
2020-07-13T19:39:15.000Z
'''Analytic routines for debris disks.''' import numpy as np from . import photometry from . import filter from . import utils class BB_Disk(object): '''A blackbody disk class. Takes multiple temperatures, the purpose being for use to show disk properties in parameter spaces such as fractional l...
37.731788
101
0.526196
import numpy as np from . import photometry from . import filter from . import utils class BB_Disk(object): def __init__(self,wavelengths=None,temperatures=None, lstar=None,tstar=None,distance=None): if wavelengths is None: self.wavelengths = 10**np.linspace(-1,4,10...
true
true
f7fe3f9bc200f644573ec804033d199944028ccc
920
py
Python
pcstools/compat.py
DIKU-PCS/pcstools
cba37914f566b3a848de6de785ada66a41c7be4d
[ "MIT" ]
1
2019-01-03T15:41:33.000Z
2019-01-03T15:41:33.000Z
pcstools/compat.py
DIKU-PCS/pcstools
cba37914f566b3a848de6de785ada66a41c7be4d
[ "MIT" ]
1
2019-01-07T12:12:26.000Z
2019-01-10T14:06:03.000Z
pcstools/compat.py
DIKU-PCS/pcstools
cba37914f566b3a848de6de785ada66a41c7be4d
[ "MIT" ]
null
null
null
from __future__ import unicode_literals, print_function, absolute_import, division import sys import collections if sys.version_info < (3,): integer_types = (int, long,) bytes_type = bytes # "bytes" == "str" == a slice of bytes unicode_type = unicode # "unicode" == a valid unicode string bytearray_ty...
24.864865
82
0.709783
from __future__ import unicode_literals, print_function, absolute_import, division import sys import collections if sys.version_info < (3,): integer_types = (int, long,) bytes_type = bytes unicode_type = unicode bytearray_type = bytearray iterable_type = collections.Iterable else: integer_t...
true
true
f7fe3fcde652c902f9e6ec03eec61d9066243d33
1,799
py
Python
pytouch/main.py
aboutNisblee/PyTouch
0098aa07ac78ec1868e0a155c92342512d07613a
[ "MIT" ]
3
2016-08-19T16:17:53.000Z
2017-07-19T18:55:37.000Z
pytouch/main.py
mNisblee/PyTouch
0098aa07ac78ec1868e0a155c92342512d07613a
[ "MIT" ]
null
null
null
pytouch/main.py
mNisblee/PyTouch
0098aa07ac78ec1868e0a155c92342512d07613a
[ "MIT" ]
null
null
null
import logging import argparse from pytouch.model import get_engine, Session, reset_db from pytouch.gui.tk import window def init_db(args): db_uri = getattr(args, 'database') logging.debug('Database URI: {}'.format(db_uri)) engine = get_engine({'sqlalchemy.url': db_uri}) Session.configure(bind=engine...
33.943396
151
0.704836
import logging import argparse from pytouch.model import get_engine, Session, reset_db from pytouch.gui.tk import window def init_db(args): db_uri = getattr(args, 'database') logging.debug('Database URI: {}'.format(db_uri)) engine = get_engine({'sqlalchemy.url': db_uri}) Session.configure(bind=engine...
true
true
f7fe4058ec82de1e42ecdc36092e184e8c69410d
286
py
Python
labgraph/zmq_node/zmq_message.py
Yunusbcr/labgraph
a00ae7098b7b0e0eda8ce2e7e62dae86854616fb
[ "MIT" ]
124
2021-07-14T21:25:59.000Z
2022-03-08T20:40:16.000Z
labgraph/zmq_node/zmq_message.py
VanEdward/labgraph
9488feac59f9ef86091befdeaddb69d84e4d6fb3
[ "MIT" ]
46
2021-07-16T18:41:11.000Z
2022-03-31T20:53:00.000Z
labgraph/zmq_node/zmq_message.py
VanEdward/labgraph
9488feac59f9ef86091befdeaddb69d84e4d6fb3
[ "MIT" ]
22
2021-07-16T18:34:56.000Z
2022-03-31T15:12:06.000Z
#!/usr/bin/env python3 # Copyright 2004-present Facebook. All Rights Reserved. from ..messages import Message from ..messages.types import BytesType class ZMQMessage(Message): """ A message representing data that was/will be communicated to ZMQ. """ data: bytes
19.066667
61
0.70979
from ..messages import Message from ..messages.types import BytesType class ZMQMessage(Message): data: bytes
true
true
f7fe4083e0a07eb9bc7331a5d85aaf33088a38c8
1,938
py
Python
official/vision/beta/projects/volumetric_models/modeling/factory_test.py
VidyaKamath1089/models
09459d2afa4cae31fc85cd6108d7559aa2ddd521
[ "Apache-2.0" ]
1
2021-07-12T07:27:47.000Z
2021-07-12T07:27:47.000Z
official/vision/beta/projects/volumetric_models/modeling/factory_test.py
Zed1014/1
0e74158f72160a5d25b977de7f6f2cf4d1908dba
[ "Apache-2.0" ]
null
null
null
official/vision/beta/projects/volumetric_models/modeling/factory_test.py
Zed1014/1
0e74158f72160a5d25b977de7f6f2cf4d1908dba
[ "Apache-2.0" ]
null
null
null
# Copyright 2021 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
40.375
103
0.762126
from absl.testing import parameterized import tensorflow as tf from official.vision.beta.projects.volumetric_models.configs import semantic_segmentation_3d as exp_cfg from official.vision.beta.projects.volumetric_models.modeling import backbones from official.vision.beta.projects.volumetric_models.mode...
true
true
f7fe41870dedf643cef5f5c5ef6085322163adde
14,370
py
Python
kubernetes/client/models/v1_node_system_info.py
fsduser/python
2b20069ebc05283352fbdc95bbdca2b6133a4175
[ "Apache-2.0" ]
1
2021-10-15T13:05:45.000Z
2021-10-15T13:05:45.000Z
kubernetes/client/models/v1_node_system_info.py
belajarqywok/python
b15bea16a87ad03136a4627941ac437582ea4657
[ "Apache-2.0" ]
10
2020-10-01T03:15:01.000Z
2022-03-01T03:06:31.000Z
kubernetes/client/models/v1_node_system_info.py
belajarqywok/python
b15bea16a87ad03136a4627941ac437582ea4657
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 """ Kubernetes No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 The version of the OpenAPI document: release-1.19 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import si...
37.324675
274
0.653236
import pprint import re import six from kubernetes.client.configuration import Configuration class V1NodeSystemInfo(object): openapi_types = { 'architecture': 'str', 'boot_id': 'str', 'container_runtime_version': 'str', 'kernel_version': 'str', 'kube_proxy_version'...
true
true
f7fe41f49752828ebc760e8651e0f1f355762ceb
3,447
py
Python
insta/settings.py
alerin345/Instagram
082e4a64042ae94f3eacfc10144f925e3dfc2492
[ "MIT" ]
1
2020-12-31T00:28:24.000Z
2020-12-31T00:28:24.000Z
insta/settings.py
alerin345/Instagram
082e4a64042ae94f3eacfc10144f925e3dfc2492
[ "MIT" ]
null
null
null
insta/settings.py
alerin345/Instagram
082e4a64042ae94f3eacfc10144f925e3dfc2492
[ "MIT" ]
null
null
null
""" Django settings for insta project. Generated by 'django-admin startproject' using Django 3.1.3. For more information on this file, see https://docs.djangoproject.com/en/3.1/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/3.1/ref/settings/ """ import os from...
25.917293
91
0.691036
import os from pathlib import Path BASE_DIR = Path(__file__).resolve().parent.parent SECRET_KEY = '=om6hirndn-h)u5kft^nozqr)_!jn)50*z&j5=kbv0u6d(#c+2' DEBUG = True ALLOWED_HOSTS = [] # Application definition INSTALLED_APPS = [ 'django_extensions', 'django.contrib.admin', 'django.contrib.auth',...
true
true
f7fe4217b716ceb186ca33d9ef2ad0751688a9fc
1,413
py
Python
tools/build/v2/util/sequence.py
jmuskaan72/Boost
047e36c01841a8cd6a5c74d4e3034da46e327bc1
[ "BSL-1.0" ]
198
2015-01-13T05:47:18.000Z
2022-03-09T04:46:46.000Z
libs/boost/tools/build/src/util/sequence.py
flingone/frameworks_base_cmds_remoted
4509d9f0468137ed7fd8d100179160d167e7d943
[ "Apache-2.0" ]
9
2015-01-28T16:33:19.000Z
2020-04-12T23:03:28.000Z
libs/boost/tools/build/src/util/sequence.py
flingone/frameworks_base_cmds_remoted
4509d9f0468137ed7fd8d100179160d167e7d943
[ "Apache-2.0" ]
139
2015-01-15T20:09:31.000Z
2022-01-31T15:21:16.000Z
# (C) Copyright David Abrahams 2002. Permission to copy, use, modify, sell and # distribute this software is granted provided this copyright notice appears in # all copies. This software is provided "as is" without express or implied # warranty, and with no claim as to its suitability for any purpose. import ...
27.705882
82
0.578202
import operator def unique (values, stable=False): if stable: s = set() r = [] for v in values: if not v in s: r.append(v) s.add(v) return r else: return list(set(values)) def max_element (elements, ordered...
true
true
f7fe42203cc4e6e4be9c60491fd33d46beae5fce
2,368
py
Python
train/Detrac_data_preprocess/params_init_Detrac_shulffnetv2_yolov3.py
yuanliangxie/YOLOv3_simple_baseline
325e2963ae770e6f45912f3142941d3bddaf9d6e
[ "Apache-2.0" ]
1
2022-02-26T10:13:08.000Z
2022-02-26T10:13:08.000Z
train/Detrac_data_preprocess/params_init_Detrac_shulffnetv2_yolov3.py
yuanliangxie/YOLOv3_simple_baseline
325e2963ae770e6f45912f3142941d3bddaf9d6e
[ "Apache-2.0" ]
null
null
null
train/Detrac_data_preprocess/params_init_Detrac_shulffnetv2_yolov3.py
yuanliangxie/YOLOv3_simple_baseline
325e2963ae770e6f45912f3142941d3bddaf9d6e
[ "Apache-2.0" ]
null
null
null
TRAINING_PARAMS = \ { "model_params": { "backbone_name": "darknet53", "backbone_weight": "", }, "model": { "anchors": [[[116, 90], [156, 198], [373, 326]], [[30, 61], [62, 45], [59, 119]], [[10, 13], [16, 30], [33, 23]]], "classes": 1, #"classes_category": ['car', 'bus', 'van', 'others...
28.878049
104
0.65625
TRAINING_PARAMS = \ { "model_params": { "backbone_name": "darknet53", "backbone_weight": "", }, "model": { "anchors": [[[116, 90], [156, 198], [373, 326]], [[30, 61], [62, 45], [59, 119]], [[10, 13], [16, 30], [33, 23]]], "classes": 1, "classes_category": ["car"] }, "lr": { ...
true
true
f7fe428801f26fbcc418e80b37e066c5da680594
1,281
py
Python
examples/bsa.py
KenjiHarada/FSS-tools
e45f4ac19cad1843f8efba420fd46e3e5210a77a
[ "MIT" ]
2
2022-03-15T03:02:15.000Z
2022-03-15T03:03:16.000Z
examples/bsa.py
KenjiHarada/FSS-tools
e45f4ac19cad1843f8efba420fd46e3e5210a77a
[ "MIT" ]
null
null
null
examples/bsa.py
KenjiHarada/FSS-tools
e45f4ac19cad1843f8efba420fd46e3e5210a77a
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """Example code of FSS by GP with fss_torch. Copyright 2022 Kenji Harada """ import sys, os import math import torch.optim as optim sys.path.append(os.path.abspath("../src")) import fss_torch # the square Ising model tc_true = 0.5 * math.log(1 + math.sqrt(2)) # c1_true, c2_true = (1.0, 0) # f...
26.6875
83
0.672131
import sys, os import math import torch.optim as optim sys.path.append(os.path.abspath("../src")) import fss_torch tc_true = 0.5 * math.log(1 + math.sqrt(2)) c1_true, c2_true = (1.0, 0.125) fname = "./Data/Ising2D/ising-square-M.dat" dataset = fss_torch.fss.Dataset.fromFile(fname=fname) rtc, rc1, rc2 = 0.97,...
true
true
f7fe42b7a332321fc6a1ab8da30c276e6825a104
92,355
py
Python
kubernetes/client/apis/batch_v2alpha1_api.py
Scalr/kubernetes-client-python
07442bdb76f0876ec96c0b0da6f9c4b06d7e5e38
[ "Apache-2.0" ]
3
2019-05-19T05:05:37.000Z
2020-03-20T04:56:20.000Z
kubernetes/client/apis/batch_v2alpha1_api.py
Scalr/kubernetes-client-python
07442bdb76f0876ec96c0b0da6f9c4b06d7e5e38
[ "Apache-2.0" ]
null
null
null
kubernetes/client/apis/batch_v2alpha1_api.py
Scalr/kubernetes-client-python
07442bdb76f0876ec96c0b0da6f9c4b06d7e5e38
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 """ Kubernetes No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: v1.13.5 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import sys import os i...
63.693103
1,390
0.649851
from __future__ import absolute_import import sys import os import re from six import iteritems from ..api_client import ApiClient class BatchV2alpha1Api(object): def __init__(self, api_client=None): if api_client is None: api_client = ApiClient() self.api_client = api_client ...
true
true
f7fe42f0af33a41033a59be00494647cd2ccc3ac
6,562
py
Python
snip-tensorflow/main.py
isabuster/snip
8e7644edd1f4dcca0f833666cf54474bcacf2aea
[ "MIT" ]
1
2020-09-13T09:18:13.000Z
2020-09-13T09:18:13.000Z
snip-tensorflow/main.py
isabuster/snip
8e7644edd1f4dcca0f833666cf54474bcacf2aea
[ "MIT" ]
null
null
null
snip-tensorflow/main.py
isabuster/snip
8e7644edd1f4dcca0f833666cf54474bcacf2aea
[ "MIT" ]
null
null
null
import os import sys import argparse import tensorflow as tf import numpy as np import scipy.stats as st import matplotlib.pyplot as plt from dataset import Dataset from model import Model import prune import train import test # from tensorflow.python.tools.inspect_checkpoint import print_tensors_in_checkpoint_file ...
43.456954
141
0.685005
import os import sys import argparse import tensorflow as tf import numpy as np import scipy.stats as st import matplotlib.pyplot as plt from dataset import Dataset from model import Model import prune import train import test def parse_arguments(): parser = argparse.ArgumentParser() parser.add_argumen...
true
true
f7fe43863559be980753001b2a85fea9c0ee5159
2,186
py
Python
ab.py
sshanuraj/alpha-beta-prune
779a25496f5a52f29771622baf6226c0798f216b
[ "MIT" ]
null
null
null
ab.py
sshanuraj/alpha-beta-prune
779a25496f5a52f29771622baf6226c0798f216b
[ "MIT" ]
null
null
null
ab.py
sshanuraj/alpha-beta-prune
779a25496f5a52f29771622baf6226c0798f216b
[ "MIT" ]
null
null
null
import numpy as np import random import pdb #pdb.set_trace() MIN = 0 MAX = 1 INF = 10000 NINF = -10000 class Node: def __init__(self, parent, m): self.val = NINF self.alpha = NINF self.beta = INF self.children = [] self.agent = m self.parent = parent def rese...
20.240741
85
0.586002
import numpy as np import random import pdb MIN = 0 MAX = 1 INF = 10000 NINF = -10000 class Node: def __init__(self, parent, m): self.val = NINF self.alpha = NINF self.beta = INF self.children = [] self.agent = m self.parent = parent def resetValues(self): ...
true
true
f7fe440a5f232a4a64a15984d9fc0eac3e56057b
3,602
py
Python
bspump/declarative/expression/arithmetic.py
LibertyAces/BitSwanPump
02301bfd4e807836403ce6a22030ad47058541d6
[ "BSD-3-Clause" ]
17
2019-02-14T09:26:03.000Z
2022-03-11T09:23:52.000Z
bspump/declarative/expression/arithmetic.py
LibertyAces/BitSwanPump
02301bfd4e807836403ce6a22030ad47058541d6
[ "BSD-3-Clause" ]
91
2019-05-06T18:59:02.000Z
2022-01-11T06:22:32.000Z
bspump/declarative/expression/arithmetic.py
LibertyAces/BitSwanPump
02301bfd4e807836403ce6a22030ad47058541d6
[ "BSD-3-Clause" ]
10
2019-04-23T08:48:58.000Z
2022-02-13T14:24:28.000Z
import operator from ..abc import SequenceExpression class ADD(SequenceExpression): """ Add all values from expressions. """ Attributes = { "Items": [ 'si64', 'si8', 'si16', 'si32', 'si128', 'si256', 'ui8', 'ui16', 'ui32', 'ui64', 'ui128', 'ui256', 'fp64', 'fp16', 'fp32', 'fp128', 'str', ] } ...
22.09816
71
0.673515
import operator from ..abc import SequenceExpression class ADD(SequenceExpression): Attributes = { "Items": [ 'si64', 'si8', 'si16', 'si32', 'si128', 'si256', 'ui8', 'ui16', 'ui32', 'ui64', 'ui128', 'ui256', 'fp64', 'fp16', 'fp32', 'fp128', 'str', ] } Category = "Arithmetic" def __call__(self...
true
true
f7fe441ef09aff85ea028ddd19931fcfbe5a8d7a
4,360
py
Python
ranger/colorschemes/solarized.py
bryanwills/dotfiles
ebc885d51ab7849a953f1e447b87f172ab686b25
[ "MIT" ]
null
null
null
ranger/colorschemes/solarized.py
bryanwills/dotfiles
ebc885d51ab7849a953f1e447b87f172ab686b25
[ "MIT" ]
null
null
null
ranger/colorschemes/solarized.py
bryanwills/dotfiles
ebc885d51ab7849a953f1e447b87f172ab686b25
[ "MIT" ]
null
null
null
# This file is part of ranger, the console file manager. # License: GNU GPL version 3, see the file "AUTHORS" for details. # Author: Joseph Tannhuber <sepp.tannhuber@yahoo.de>, 2013 # Solarized like colorscheme, similar to solarized-dircolors # from https://github.com/seebi/dircolors-solarized. # This is a modification...
30.48951
84
0.452752
from __future__ import (absolute_import, division, print_function) from ranger.gui.colorscheme import ColorScheme from ranger.gui.color import ( cyan, magenta, red, white, default, normal, bold, reverse, default_colors, ) class Solarized(ColorScheme): progress_bar_color = 33 def use(self,...
true
true
f7fe44ba34d8e1302c7841680e9f10366332e077
2,699
py
Python
deployment/config.prod.py
hemangandhi/lcs
9dc96ae51b6389a72ee36cb205b4a2372858df1e
[ "MIT" ]
7
2018-07-09T01:54:02.000Z
2022-02-25T21:10:14.000Z
deployment/config.prod.py
hemangandhi/lcs
9dc96ae51b6389a72ee36cb205b4a2372858df1e
[ "MIT" ]
101
2018-06-25T03:57:03.000Z
2022-01-13T01:40:23.000Z
deployment/config.prod.py
hemangandhi/lcs
9dc96ae51b6389a72ee36cb205b4a2372858df1e
[ "MIT" ]
2
2021-07-22T00:39:48.000Z
2022-03-04T19:55:33.000Z
from datetime import datetime, timezone, timedelta import os # uri should contain auth and default database DB_URI = os.getenv("PRODUCTION_DB_URI", "") DB_COLLECTIONS = { "users": "users", "magic links": "magicLinks", "slack messages": "slackMessages" } SPARKPOST_KEY = os.getenv("PRODUCTION_SPARKPOST_K...
42.171875
231
0.720267
from datetime import datetime, timezone, timedelta import os DB_URI = os.getenv("PRODUCTION_DB_URI", "") DB_COLLECTIONS = { "users": "users", "magic links": "magicLinks", "slack messages": "slackMessages" } SPARKPOST_KEY = os.getenv("PRODUCTION_SPARKPOST_KEY", "") SLACK_KEYS = { 'token': os.geten...
true
true
f7fe45a5e11f988cd525106c769bc19a28f266e8
2,447
py
Python
app/models.py
billowbashir/MaNeighba
84ee7f86ac471c5449d94bd592adf004b3288823
[ "Unlicense" ]
null
null
null
app/models.py
billowbashir/MaNeighba
84ee7f86ac471c5449d94bd592adf004b3288823
[ "Unlicense" ]
4
2020-06-05T19:26:19.000Z
2021-09-08T00:33:53.000Z
app/models.py
billowbashir/MaNeighba
84ee7f86ac471c5449d94bd592adf004b3288823
[ "Unlicense" ]
null
null
null
from django.db import models from django.contrib.auth.models import User class Neighbourhood(models.Model): name=models.CharField(max_length=60) location=models.CharField(max_length=60) population=models.IntegerField() admin=models.ForeignKey(User,on_delete=models.CASCADE) def create_neigborhood(s...
31.371795
78
0.7217
from django.db import models from django.contrib.auth.models import User class Neighbourhood(models.Model): name=models.CharField(max_length=60) location=models.CharField(max_length=60) population=models.IntegerField() admin=models.ForeignKey(User,on_delete=models.CASCADE) def create_neigborhood(s...
true
true
f7fe47a4927438bfc838f1831fa8c68f9d1deb1a
1,873
py
Python
ginga/mockw/ImageViewCanvasMock.py
Cadair/ginga
5afdd8824f27c7ae7d8d82b5013b0ff0068bd8b8
[ "BSD-3-Clause" ]
null
null
null
ginga/mockw/ImageViewCanvasMock.py
Cadair/ginga
5afdd8824f27c7ae7d8d82b5013b0ff0068bd8b8
[ "BSD-3-Clause" ]
null
null
null
ginga/mockw/ImageViewCanvasMock.py
Cadair/ginga
5afdd8824f27c7ae7d8d82b5013b0ff0068bd8b8
[ "BSD-3-Clause" ]
null
null
null
# # ImageViewCanvasMock.py -- A Ginga image widget with canvas drawing in mock # widget set # # Eric Jeschke (eric@naoj.org) # # Copyright (c) Eric R. Jeschke. All rights reserved. # This is open-source software licensed under a BSD license. # Please see the file LICENSE.txt for details. # ...
34.054545
76
0.610785
from ginga.mockw import ImageViewMock from ginga.canvas.mixins import DrawingMixin, CanvasMixin, CompoundMixin class ImageViewCanvasError(ImageViewMock.ImageViewMockError): pass class ImageViewCanvas(ImageViewMock.ImageViewZoom, DrawingMixin, CanvasMixin, CompoundMixin): def ...
true
true
f7fe47edb7673a8f735c3e787ec10a0751ea2d7a
13,015
py
Python
ML_venv/Lib/site-packages/jupyter_client/ssh/tunnel.py
ashokjohn/ML_RealWorld
8508c8cd6a9fd0467ee68954850179ab2506bc04
[ "MIT" ]
null
null
null
ML_venv/Lib/site-packages/jupyter_client/ssh/tunnel.py
ashokjohn/ML_RealWorld
8508c8cd6a9fd0467ee68954850179ab2506bc04
[ "MIT" ]
null
null
null
ML_venv/Lib/site-packages/jupyter_client/ssh/tunnel.py
ashokjohn/ML_RealWorld
8508c8cd6a9fd0467ee68954850179ab2506bc04
[ "MIT" ]
null
null
null
"""Basic ssh tunnel utilities, and convenience functions for tunneling zeromq connections. """ # Copyright (C) 2010-2011 IPython Development Team # Copyright (C) 2011- PyZMQ Developers # # Redistributed from IPython under the terms of the BSD License. import atexit import os import re import signal import socket impor...
31.062053
100
0.625279
import atexit import os import re import signal import socket import sys import warnings from getpass import getpass from getpass import getuser from multiprocessing import Process try: with warnings.catch_warnings(): warnings.simplefilter("ignore", DeprecationWarning) import paramiko ...
true
true
f7fe4938f843c5bb0fd2a660961b2113f91fec79
85
py
Python
app/apps.py
MexsonFernandes/uploadDownloadFiles-Django
60d01fd4301a82ae6f34cf8ae1b14476809e22a5
[ "Apache-2.0" ]
3
2021-06-27T13:25:19.000Z
2021-07-16T07:49:07.000Z
app/apps.py
MexsonFernandes/upload-download-files-django
60d01fd4301a82ae6f34cf8ae1b14476809e22a5
[ "Apache-2.0" ]
null
null
null
app/apps.py
MexsonFernandes/upload-download-files-django
60d01fd4301a82ae6f34cf8ae1b14476809e22a5
[ "Apache-2.0" ]
2
2021-06-27T13:25:20.000Z
2021-07-06T12:11:58.000Z
from django.apps import AppConfig class MainAppConfig(AppConfig): name = 'app'
14.166667
33
0.741176
from django.apps import AppConfig class MainAppConfig(AppConfig): name = 'app'
true
true
f7fe4a181670a2ed4ab959c5d3f11521856cdafa
3,138
py
Python
examples/ch05/snippets_py/05_17.py
germanngc/PythonFundamentals
14d22baa30d7c3c5404fc11362709669e92474b8
[ "Apache-2.0" ]
4
2019-05-04T00:33:25.000Z
2021-05-29T20:37:59.000Z
examples/ch05/snippets_py/05_17.py
germanngc/PythonFundamentals
14d22baa30d7c3c5404fc11362709669e92474b8
[ "Apache-2.0" ]
null
null
null
examples/ch05/snippets_py/05_17.py
germanngc/PythonFundamentals
14d22baa30d7c3c5404fc11362709669e92474b8
[ "Apache-2.0" ]
3
2020-05-05T13:14:28.000Z
2022-02-03T16:18:37.000Z
# Section 5.17 snippets # 5.17.1 Sample Graphs for 600, 60,000 and 6,000,000 Die Rolls # 5.17.2 Visualizing Die-Roll Frequencies and Percentages # Launching IPython for Interactive Matplotlib Development # Importing the Libraries import matplotlib.pyplot as plt import numpy as np import random import seaborn as...
33.382979
74
0.635437
import matplotlib.pyplot as plt import numpy as np import random import seaborn as sns rolls = [random.randrange(1, 7) for i in range(600)] values, frequencies = np.unique(rolls, return_counts=True) title = f'Rolling a Six-Sided Die {len(rolls):,} Times' sns.set_style('whitegrid') axes = sns.barplot...
false
true
f7fe4a2403b84b78ebf1be11ce616fd1a1dea40d
8,365
py
Python
CommandRunner.py
lukud/raccoon-
52bcc8667ec754a6b25908f2a6426aa913eed13f
[ "MIT" ]
null
null
null
CommandRunner.py
lukud/raccoon-
52bcc8667ec754a6b25908f2a6426aa913eed13f
[ "MIT" ]
1
2015-09-10T15:37:07.000Z
2015-09-10T15:37:07.000Z
CommandRunner.py
lukud/raccoon-
52bcc8667ec754a6b25908f2a6426aa913eed13f
[ "MIT" ]
null
null
null
""" This module was taken from the PBSUITE (v 14.9.9) available at http://sourceforge.net/projects/pb-jelly/ It has been published with the follwing licencsing: ################################################## Copyright (c) '2013 Baylor College of Medicine Contributors: Adam English (engli...
40.023923
105
0.564854
from string import Template import tempfile import subprocess, signal, logging, os, stat, sys class Alarm(Exception): pass def alarm_handler(signum, frame): raise Alarm def exe(cmd, timeout=-1): proc = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE, \ ...
true
true
f7fe4adf952708994eea70778baf0af38b493f75
8,214
py
Python
knn.py
bergr7/KNN_from_scratch
8c1e40f89b078a46b27c347d2faa3d3491a47958
[ "MIT", "Unlicense" ]
null
null
null
knn.py
bergr7/KNN_from_scratch
8c1e40f89b078a46b27c347d2faa3d3491a47958
[ "MIT", "Unlicense" ]
null
null
null
knn.py
bergr7/KNN_from_scratch
8c1e40f89b078a46b27c347d2faa3d3491a47958
[ "MIT", "Unlicense" ]
null
null
null
import numpy as np from sklearn.metrics import confusion_matrix class Knn: """Classifier implementing the k-nearest neighbors vote. Parameters __________ :param n_neighbors : int Number of neighbors to use. :param metric : {'manhattan', 'euclidean', 'minkowski'}, default='minkowski' ...
40.264706
124
0.6271
import numpy as np from sklearn.metrics import confusion_matrix class Knn: def __init__(self, n_neighbors, metric='minkowski', p=2, weights='uniform'): if p < 0: raise ValueError("p should be larger than 0.") if metric not in ['minkowski', 'manhattan', 'euclidean']: raise...
true
true
f7fe4aec16aa13407640895438d55a42bbe968af
4,816
py
Python
src/programy/storage/stores/nosql/mongo/store/lookups.py
cdoebler1/AIML2
ee692ec5ea3794cd1bc4cc8ec2a6b5e5c20a0d6a
[ "MIT" ]
345
2016-11-23T22:37:04.000Z
2022-03-30T20:44:44.000Z
src/programy/storage/stores/nosql/mongo/store/lookups.py
MikeyBeez/program-y
00d7a0c7d50062f18f0ab6f4a041068e119ef7f0
[ "MIT" ]
275
2016-12-07T10:30:28.000Z
2022-02-08T21:28:33.000Z
src/programy/storage/stores/nosql/mongo/store/lookups.py
VProgramMist/modified-program-y
f32efcafafd773683b3fe30054d5485fe9002b7d
[ "MIT" ]
159
2016-11-28T18:59:30.000Z
2022-03-20T18:02:44.000Z
""" Copyright (c) 2016-2020 Keith Sterling http://www.keithsterling.com Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, m...
35.411765
120
0.69186
from programy.utils.logging.ylogger import YLogger from programy.storage.stores.nosql.mongo.store.mongostore import MongoStore from programy.storage.entities.lookups import LookupsStore from programy.storage.stores.nosql.mongo.dao.lookup import Lookup from programy.mappings.base import DoubleStringPatternSplitCollectio...
true
true
f7fe4b1b43e9516b0f744f723b691f4863a20ce6
6,365
py
Python
signjoey/initialization.py
ChenYutongTHU/slt
2fb617feccccedb008446d34dcf5b3527b004ce6
[ "Apache-2.0" ]
129
2020-04-01T20:12:22.000Z
2022-03-28T15:24:18.000Z
signjoey/initialization.py
ChenYutongTHU/slt
2fb617feccccedb008446d34dcf5b3527b004ce6
[ "Apache-2.0" ]
10
2020-11-13T19:01:29.000Z
2022-03-12T00:45:45.000Z
signjoey/initialization.py
ChenYutongTHU/slt
2fb617feccccedb008446d34dcf5b3527b004ce6
[ "Apache-2.0" ]
66
2020-06-18T10:38:17.000Z
2022-03-28T21:41:03.000Z
# coding: utf-8 """ Implements custom initialization """ import math import torch import torch.nn as nn from torch import Tensor from torch.nn.init import _calculate_fan_in_and_fan_out def orthogonal_rnn_init_(cell: nn.RNNBase, gain: float = 1.0): """ Orthogonal initialization of recurrent weights RNN ...
36.164773
81
0.631736
import math import torch import torch.nn as nn from torch import Tensor from torch.nn.init import _calculate_fan_in_and_fan_out def orthogonal_rnn_init_(cell: nn.RNNBase, gain: float = 1.0): with torch.no_grad(): for _, hh, _, _ in cell.all_weights: for i in range(0, hh.size(0), cell.hidde...
true
true
f7fe4b5a45252e412b20a4a9a774a31967ea2ce9
9,009
py
Python
python/tests/expressions/test_expressions_base.py
x-malet/iceberg
04871b79e9aba02e9534498fa035b627bcb9af6e
[ "Apache-2.0" ]
1
2020-12-24T07:48:54.000Z
2020-12-24T07:48:54.000Z
python/tests/expressions/test_expressions_base.py
x-malet/iceberg
04871b79e9aba02e9534498fa035b627bcb9af6e
[ "Apache-2.0" ]
null
null
null
python/tests/expressions/test_expressions_base.py
x-malet/iceberg
04871b79e9aba02e9534498fa035b627bcb9af6e
[ "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 u...
34.65
109
0.675214
import uuid from decimal import Decimal import pytest from iceberg.expressions import base from iceberg.types import NestedField, Singleton, StringType @pytest.mark.parametrize( "operation,opposite_operation", [ (base.Operation.TRUE, base.Operation.FALSE), (base.Operation.FA...
true
true
f7fe4bfe1f462944fb31ee9a6c93aa914fa7f0fc
93
py
Python
mlopen/mlopenapp/apps.py
AUTH-MINT/MLOpen
17ce5a3a4bae683612d3e46ea0fb9d07414c9904
[ "MIT" ]
null
null
null
mlopen/mlopenapp/apps.py
AUTH-MINT/MLOpen
17ce5a3a4bae683612d3e46ea0fb9d07414c9904
[ "MIT" ]
null
null
null
mlopen/mlopenapp/apps.py
AUTH-MINT/MLOpen
17ce5a3a4bae683612d3e46ea0fb9d07414c9904
[ "MIT" ]
null
null
null
from django.apps import AppConfig class MlopenappConfig(AppConfig): name = 'mlopenapp'
15.5
33
0.763441
from django.apps import AppConfig class MlopenappConfig(AppConfig): name = 'mlopenapp'
true
true
f7fe4d46008763b887c9dcd70f81c378c721f39b
1,334
py
Python
bloomfilter.py
sonicskye/smart-stamp-duty-UI
9cde6ce98acde28ed0df34bb1149896600cc840b
[ "MIT" ]
2
2018-11-26T14:19:23.000Z
2018-12-20T22:09:41.000Z
bloomfilter.py
sonicskye/smart-stamp-duty-UI
9cde6ce98acde28ed0df34bb1149896600cc840b
[ "MIT" ]
null
null
null
bloomfilter.py
sonicskye/smart-stamp-duty-UI
9cde6ce98acde28ed0df34bb1149896600cc840b
[ "MIT" ]
null
null
null
''' sonicskye bloomfilter.py Requirements: bitarray (https://github.com/ilanschnell/bitarray) pybloof (https://github.com/jhgg/pybloof) Pybloof library is used due to its built-in export and import features These features are convenient for storing the bloom filter information to the smart contract and import the...
27.791667
92
0.667166
import pybloof import utilities as u def createstringbloomfilter(wordlist): setwordlist = set(wordlist) sz = len(setwordlist) + 500 bf = pybloof.StringBloomFilter(size=sz, hashes=9) for word in wordlist: if word not in bf: bf.add(word) return bf.to_base...
true
true
f7fe4e1736c5b1b484ff68e6225ccd406608f75e
5,110
py
Python
decision_tree.py
hcbh96/Random-Forest-FYP
4af2c85a4f4d998f616751f9c366329bdc559b13
[ "MIT" ]
null
null
null
decision_tree.py
hcbh96/Random-Forest-FYP
4af2c85a4f4d998f616751f9c366329bdc559b13
[ "MIT" ]
null
null
null
decision_tree.py
hcbh96/Random-Forest-FYP
4af2c85a4f4d998f616751f9c366329bdc559b13
[ "MIT" ]
null
null
null
""" In this file I want to: create DT Train DT Test DT Analyse Accurancy Analyse Sensitivity Analyse Precision Check Feature Importance """ import pandas as pd from sklearn.model_selection import train_test_split import numpy as np from sklearn.tree import DecisionTreeClassifier, export_grap...
30.058824
155
0.731311
import pandas as pd from sklearn.model_selection import train_test_split import numpy as np from sklearn.tree import DecisionTreeClassifier, export_graphviz from evaluate_model import evaluate_model, performance_assessor from confusion_matrix import plot_confusion_matrix from sklearn.metrics import confusion_matrix imp...
true
true
f7fe4e211472caf271200cc3d30b7f679222a4f4
1,407
py
Python
examples/text-classification/config_for_attention_visualization_for_loading_lex_model_hpc.py
mithunpaul08/transformers
55d5e0a1d88f0922dc2af3be140e077850c66fee
[ "Apache-2.0" ]
null
null
null
examples/text-classification/config_for_attention_visualization_for_loading_lex_model_hpc.py
mithunpaul08/transformers
55d5e0a1d88f0922dc2af3be140e077850c66fee
[ "Apache-2.0" ]
null
null
null
examples/text-classification/config_for_attention_visualization_for_loading_lex_model_hpc.py
mithunpaul08/transformers
55d5e0a1d88f0922dc2af3be140e077850c66fee
[ "Apache-2.0" ]
null
null
null
[BERT] model_name_or_path="bert-base-cased" task_name="fevercrossdomain" do_train=True do_eval=True do_predict=True #do_train_1student_1teacher=True data_dir="/home/u11/mithunpaul/xdisk/huggingface_bert_fever_to_fnc_load_lex/data/fever/fevercrossdomain/lex/figerspecific/" max_seq_length="128" per_device_eval_batch_size...
48.517241
174
0.851457
[BERT] model_name_or_path="bert-base-cased" task_name="fevercrossdomain" do_train=True do_eval=True do_predict=True data_dir="/home/u11/mithunpaul/xdisk/huggingface_bert_fever_to_fnc_load_lex/data/fever/fevercrossdomain/lex/figerspecific/" max_seq_length="128" per_device_eval_batch_size="16" per_device_train_batch_siz...
true
true
f7fe4e7d10080f1d2252b5fa851aef8e2f9eb15f
9,762
py
Python
test/functional/p2p_blockfilters.py
XbitCC/xbitcoin
2c71b1adc311680e8f3aa977b42029b1a26164f1
[ "MIT" ]
2
2021-10-16T06:16:02.000Z
2022-03-26T21:48:38.000Z
test/functional/p2p_blockfilters.py
XbitCC/xbitcoin
2c71b1adc311680e8f3aa977b42029b1a26164f1
[ "MIT" ]
null
null
null
test/functional/p2p_blockfilters.py
XbitCC/xbitcoin
2c71b1adc311680e8f3aa977b42029b1a26164f1
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2019 The XBit Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Tests NODE_COMPACT_FILTERS (BIP 157/158). Tests that a node configured with -blockfilterindex and -peerblockfi...
37.984436
99
0.641262
from test_framework.messages import ( FILTER_TYPE_BASIC, NODE_COMPACT_FILTERS, hash256, msg_getcfcheckpt, msg_getcfheaders, msg_getcfilters, ser_uint256, uint256_from_str, ) from test_framework.p2p import P2PInterface from test_framework.test_framework import XBitTestFramework from ...
true
true
f7fe4e86a1e1f5023e81366bb1e1239755c00b59
940
py
Python
src/probabilistic_models/probabilistic_model.py
pfreifer/zxcvbn
22674a65bc6ff56281bdd5415ebdb30bb19811ef
[ "MIT" ]
null
null
null
src/probabilistic_models/probabilistic_model.py
pfreifer/zxcvbn
22674a65bc6ff56281bdd5415ebdb30bb19811ef
[ "MIT" ]
null
null
null
src/probabilistic_models/probabilistic_model.py
pfreifer/zxcvbn
22674a65bc6ff56281bdd5415ebdb30bb19811ef
[ "MIT" ]
null
null
null
import pickle from src.probabilistic_models.grammar_utils import score, update from math import log from decimal import Decimal def probabilistic_model_guesses(password): scores = pickle.load(open("scores.p", "rb")) (cb_counter, Q) = pickle.load(open("cb_dictionary.p", "rb")) (sb_counter, B) = pickle.load(...
32.413793
66
0.670213
import pickle from src.probabilistic_models.grammar_utils import score, update from math import log from decimal import Decimal def probabilistic_model_guesses(password): scores = pickle.load(open("scores.p", "rb")) (cb_counter, Q) = pickle.load(open("cb_dictionary.p", "rb")) (sb_counter, B) = pickle.load(...
true
true
f7fe4fbbf04ddc7f858ba1868ed2188887e30a06
316
py
Python
__main__.py
HsOjo/QiniuSyncer
92e21179cd97ef1b5baf294d04dbfb7ce3db7aa9
[ "MIT" ]
null
null
null
__main__.py
HsOjo/QiniuSyncer
92e21179cd97ef1b5baf294d04dbfb7ce3db7aa9
[ "MIT" ]
null
null
null
__main__.py
HsOjo/QiniuSyncer
92e21179cd97ef1b5baf294d04dbfb7ce3db7aa9
[ "MIT" ]
null
null
null
import sys from app import Application from app.util import pyinstaller from app.util.log import Log if getattr(sys, 'frozen', False): # is run at pyinstaller pyinstaller.fix_encoding_in_pyinstaller() Log.init_app() app = Application(sys.argv) try: app.run() except: app.callback_exception()
17.555556
45
0.731013
import sys from app import Application from app.util import pyinstaller from app.util.log import Log if getattr(sys, 'frozen', False): pyinstaller.fix_encoding_in_pyinstaller() Log.init_app() app = Application(sys.argv) try: app.run() except: app.callback_exception()
true
true
f7fe4fd5cf6a4fdc152ccc972689d709caa4b252
907
py
Python
backend/migrations/versions/425803e3d9cd_.py
cclauss/lineage
065cf182095cd7ff3fe5c9f38e1009f1f2a81c19
[ "MIT" ]
1
2021-09-06T15:26:46.000Z
2021-09-06T15:26:46.000Z
backend/migrations/versions/425803e3d9cd_.py
cclauss/lineage
065cf182095cd7ff3fe5c9f38e1009f1f2a81c19
[ "MIT" ]
null
null
null
backend/migrations/versions/425803e3d9cd_.py
cclauss/lineage
065cf182095cd7ff3fe5c9f38e1009f1f2a81c19
[ "MIT" ]
1
2020-11-12T05:23:09.000Z
2020-11-12T05:23:09.000Z
"""empty message Revision ID: 425803e3d9cd Revises: 0f846b00d0db Create Date: 2020-10-21 17:12:57.595639 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = '425803e3d9cd' down_revision = '0f846b00d0db' branch_labels = None depends_on = None def upgrade(): # ...
25.914286
65
0.652701
from alembic import op import sqlalchemy as sa revision = '425803e3d9cd' down_revision = '0f846b00d0db' branch_labels = None depends_on = None def upgrade(): =True)
true
true
f7fe5221a2acc8a6d7580062576b6257b385ee02
1,333
py
Python
polling_stations/apps/data_importers/management/commands/import_newcastle_under_lyme.py
danielgriffin48/UK-Polling-Stations
0e5273357a4fdc00c2af794c71558b6f8f2a0a49
[ "BSD-3-Clause" ]
null
null
null
polling_stations/apps/data_importers/management/commands/import_newcastle_under_lyme.py
danielgriffin48/UK-Polling-Stations
0e5273357a4fdc00c2af794c71558b6f8f2a0a49
[ "BSD-3-Clause" ]
364
2020-10-19T07:16:41.000Z
2022-03-31T06:10:55.000Z
polling_stations/apps/data_importers/management/commands/import_newcastle_under_lyme.py
danielgriffin48/UK-Polling-Stations
0e5273357a4fdc00c2af794c71558b6f8f2a0a49
[ "BSD-3-Clause" ]
null
null
null
from data_importers.management.commands import BaseXpressDemocracyClubCsvImporter class Command(BaseXpressDemocracyClubCsvImporter): council_id = "E07000195" addresses_name = "local.2018-05-03/Version 1/Democracy_Club__03May2018.tsv" stations_name = "local.2018-05-03/Version 1/Democracy_Club__03May2018.ts...
34.179487
81
0.663166
from data_importers.management.commands import BaseXpressDemocracyClubCsvImporter class Command(BaseXpressDemocracyClubCsvImporter): council_id = "E07000195" addresses_name = "local.2018-05-03/Version 1/Democracy_Club__03May2018.tsv" stations_name = "local.2018-05-03/Version 1/Democracy_Club__03May2018.ts...
true
true
f7fe5286d21de170cf376ee8f55f7bc73a6479e5
2,045
py
Python
esdlvalidator/validation/functions/utils.py
ESDLMapEditorESSIM/ESDLValidator
4573deec9b8206179ff6e61f37b4ba1847b3dbfb
[ "MIT" ]
null
null
null
esdlvalidator/validation/functions/utils.py
ESDLMapEditorESSIM/ESDLValidator
4573deec9b8206179ff6e61f37b4ba1847b3dbfb
[ "MIT" ]
null
null
null
esdlvalidator/validation/functions/utils.py
ESDLMapEditorESSIM/ESDLValidator
4573deec9b8206179ff6e61f37b4ba1847b3dbfb
[ "MIT" ]
1
2021-02-25T09:25:35.000Z
2021-02-25T09:25:35.000Z
import builtins from pyecore.ecore import EValue def has_attribute(obj, name: str) -> bool: # give a default "nothing_found" since None can be the actual returned value result = get_attribute(obj, name, "nothing_found") return False if result is "nothing_found" else True def get_attribute(obj, name: st...
29.637681
107
0.599511
import builtins from pyecore.ecore import EValue def has_attribute(obj, name: str) -> bool: result = get_attribute(obj, name, "nothing_found") return False if result is "nothing_found" else True def get_attribute(obj, name: str, default=None) -> bool: parts = name.split(".", 1) value = defaul...
true
true
f7fe52b6188fec90349cb6f1213359500cc6f26f
16,149
py
Python
tests/test_text.py
fhoehle/fletcher
09f1c9bc03c1603fa0facefb7a485a84f136a578
[ "MIT" ]
null
null
null
tests/test_text.py
fhoehle/fletcher
09f1c9bc03c1603fa0facefb7a485a84f136a578
[ "MIT" ]
2
2020-07-17T13:41:00.000Z
2020-10-13T19:20:49.000Z
tests/test_text.py
fhoehle/fletcher
09f1c9bc03c1603fa0facefb7a485a84f136a578
[ "MIT" ]
null
null
null
import math import string from typing import Optional, Sequence, Tuple import hypothesis.strategies as st import numpy as np import pandas as pd import pandas.testing as tm import pyarrow as pa import pytest from hypothesis import example, given, settings import fletcher as fr from fletcher.testing import examples t...
31.055769
121
0.65391
import math import string from typing import Optional, Sequence, Tuple import hypothesis.strategies as st import numpy as np import pandas as pd import pandas.testing as tm import pyarrow as pa import pytest from hypothesis import example, given, settings import fletcher as fr from fletcher.testing import examples t...
true
true
f7fe53a14ebd06e839cdac7c0ba4f6b270edc0a5
4,913
py
Python
code_snippets/chap2.py
sgheb/ml-for-asset-managers
53f9ee5a59a00004ac67920ad11e244ffc02a503
[ "MIT" ]
null
null
null
code_snippets/chap2.py
sgheb/ml-for-asset-managers
53f9ee5a59a00004ac67920ad11e244ffc02a503
[ "MIT" ]
2
2020-08-09T22:32:31.000Z
2020-08-30T02:21:07.000Z
code_snippets/chap2.py
sgheb/ml-for-asset-managers
53f9ee5a59a00004ac67920ad11e244ffc02a503
[ "MIT" ]
1
2020-08-15T06:08:51.000Z
2020-08-15T06:08:51.000Z
import numpy as np import pandas as pd from sklearn.neighbors import KernelDensity from scipy.optimize import minimize from scipy.linalg import block_diag from sklearn.covariance import LedoitWolf def fix_shape(x): if len(x.shape) == 1: x = x.reshape(-1, 1) return x # Snippet 2.1 def mpPDF(var, q, p...
28.235632
85
0.615103
import numpy as np import pandas as pd from sklearn.neighbors import KernelDensity from scipy.optimize import minimize from scipy.linalg import block_diag from sklearn.covariance import LedoitWolf def fix_shape(x): if len(x.shape) == 1: x = x.reshape(-1, 1) return x def mpPDF(var, q, pts): ...
true
true
f7fe548bf7e0c7777c9472172083def0a4094adf
2,538
py
Python
MPC_expert.py
confiwent/Comyco_linear_QoE
087834ce4abfb203041de39d92f72e9adb9b976c
[ "MIT" ]
1
2022-03-16T06:56:07.000Z
2022-03-16T06:56:07.000Z
MPC_expert.py
confiwent/Comyco_linear_QoE
087834ce4abfb203041de39d92f72e9adb9b976c
[ "MIT" ]
null
null
null
MPC_expert.py
confiwent/Comyco_linear_QoE
087834ce4abfb203041de39d92f72e9adb9b976c
[ "MIT" ]
null
null
null
""" In this version, the MPC is adopted to control the rate adaptation, with the future bandwidth having been known in advance. So we call this version MPC-Oracal """ import numpy as np from pruning_v2 import solving_opt MPC_FUTURE_CHUNK_COUNT = 7 M_IN_K = 1000.0 DEFAULT_QUALITY = 1 # default video quality without ag...
40.935484
176
0.702522
import numpy as np from pruning_v2 import solving_opt MPC_FUTURE_CHUNK_COUNT = 7 M_IN_K = 1000.0 DEFAULT_QUALITY = 1 RANDOM_SEED = 42 RAND_RANGE = 1000000 class ABRExpert: def __init__(self, abr_env, rebuf_p, smooth_p, mpc_horizon = MPC_FUTURE_CHUNK_COUNT, total_chunk_num = 48): self.env = abr_env ...
true
true
f7fe548dd2c18145b4b7be05422191d3bf2b77c6
2,054
py
Python
src/fhs_pia_wireguard_netns/pia_class/server.py
foxhunt72/fhs-pia-wireguard-netns
237b258c30c8db2da0ca3fddb8e33027bce65a81
[ "MIT" ]
null
null
null
src/fhs_pia_wireguard_netns/pia_class/server.py
foxhunt72/fhs-pia-wireguard-netns
237b258c30c8db2da0ca3fddb8e33027bce65a81
[ "MIT" ]
null
null
null
src/fhs_pia_wireguard_netns/pia_class/server.py
foxhunt72/fhs-pia-wireguard-netns
237b258c30c8db2da0ca3fddb8e33027bce65a81
[ "MIT" ]
null
null
null
"""All pia server functions.""" import os import sys import pkg_resources import subprocess import json class server(): """Create pia sever class.""" def __init__(self): super(server, self).__init__() #self.curl_command='/usr/bin/curl' self.curl_command='curl' def __server_run_cur...
34.233333
216
0.590555
import os import sys import pkg_resources import subprocess import json class server(): def __init__(self): super(server, self).__init__() self.curl_command='curl' def __server_run_curl(self, arguments: list,stdin=None): run_is = [self.curl_command] + arguments if sel...
true
true
f7fe549aa971337a01662235fde201c76ea2bc61
3,530
py
Python
rqalpha/cmds/mod.py
ForrestLin0805/rqalpha
b10d03f9a23180a93e39c40fcb048ba6db37b573
[ "Apache-2.0" ]
1
2021-02-26T11:11:31.000Z
2021-02-26T11:11:31.000Z
rqalpha/cmds/mod.py
ForrestLin0805/rqalpha
b10d03f9a23180a93e39c40fcb048ba6db37b573
[ "Apache-2.0" ]
null
null
null
rqalpha/cmds/mod.py
ForrestLin0805/rqalpha
b10d03f9a23180a93e39c40fcb048ba6db37b573
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # 版权所有 2020 深圳米筐科技有限公司(下称“米筐科技”) # # 除非遵守当前许可,否则不得使用本软件。 # # * 非商业用途(非商业用途指个人出于非商业目的使用本软件,或者高校、研究所等非营利机构出于教育、科研等目的使用本软件): # 遵守 Apache License 2.0(下称“Apache 2.0 许可”),您可以在以下位置获得 Apache 2.0 许可的副本: # http://www.apache.org/licenses/LICENSE-2.0。 # 除非法律有要求或以书面形式达成协议,否则本软件分发时...
30.17094
144
0.631161
import os from importlib import import_module import six import click from rqalpha.utils.config import dump_config from .entry import cli @cli.command(context_settings=dict( ignore_unknown_options=True, )) @click.help_option('-h', '--help') @click.argument('cmd', nargs=1, type=click.Choice(['list...
true
true
f7fe54ae334da138bfff6c36b7cecae55fa11b44
334
py
Python
server/ui/admin/dashboard/urls.py
elise-baumgartner/onramp
beb3c807264fcb70d8069ff2e3990b0ce3f59912
[ "BSD-3-Clause" ]
2
2016-09-09T04:19:01.000Z
2019-02-15T20:28:13.000Z
server/ui/admin/dashboard/urls.py
elise-baumgartner/onramp
beb3c807264fcb70d8069ff2e3990b0ce3f59912
[ "BSD-3-Clause" ]
67
2016-06-02T19:37:56.000Z
2018-02-22T05:23:45.000Z
server/ui/admin/dashboard/urls.py
elise-baumgartner/onramp
beb3c807264fcb70d8069ff2e3990b0ce3f59912
[ "BSD-3-Clause" ]
9
2015-06-22T22:10:22.000Z
2016-04-26T15:35:45.000Z
from django.conf.urls import url import views urlpatterns = [ url(r'^GetUsers/$', views.get_all_users), url(r'^GetJobs/$', views.get_all_jobs), url(r'^GetWorkspaces/$', views.get_all_workspaces), url(r'^GetPces/$', views.get_all_pces), url(r'^GetModules/$', views.get_all_modules), url(r'^$', v...
25.692308
55
0.664671
from django.conf.urls import url import views urlpatterns = [ url(r'^GetUsers/$', views.get_all_users), url(r'^GetJobs/$', views.get_all_jobs), url(r'^GetWorkspaces/$', views.get_all_workspaces), url(r'^GetPces/$', views.get_all_pces), url(r'^GetModules/$', views.get_all_modules), url(r'^$', v...
true
true
f7fe555b19c467a600d4435591599878183546f4
1,052
py
Python
Proper/proper/prop_fits_read.py
RupertDodkins/medis
bdb1f00fb93506da2a1f251bc6780e70e97a16c5
[ "MIT" ]
1
2021-06-25T17:35:56.000Z
2021-06-25T17:35:56.000Z
Proper/proper/prop_fits_read.py
RupertDodkins/medis
bdb1f00fb93506da2a1f251bc6780e70e97a16c5
[ "MIT" ]
null
null
null
Proper/proper/prop_fits_read.py
RupertDodkins/medis
bdb1f00fb93506da2a1f251bc6780e70e97a16c5
[ "MIT" ]
2
2018-12-08T15:05:13.000Z
2019-08-08T17:28:24.000Z
# Copyright 2016, 2017 California Institute of Technology # Users must agree to abide by the restrictions listed in the # file "LegalStuff.txt" in the PROPER library directory. # # PROPER developed at Jet Propulsion Laboratory/California Inst. Technology # Original IDL version by John Krist # Python transla...
26.3
91
0.66635
try: import astropy.io.fits as pyfits except IOError: import pyfits def prop_fits_read(fname, header = False): try: imgarr, imgheader = pyfits.getdata(fname, header = True, ignore_missing_end = True) except IOError: raise IOError("Unable to read FITS image %s. Stopping" %(fname)...
true
true
f7fe55e11a248045d5350a78d287edd5c35d0f8b
508
py
Python
rowingdata/painsledplot.py
sanderroosendaal/rowingdata
efd8aa1566a926f11fb3f6b5b340665bc26028c4
[ "MIT" ]
4
2017-04-24T15:20:46.000Z
2021-02-12T23:03:29.000Z
build/lib/rowingdata/painsledplot.py
sanderroosendaal/rowingdata
efd8aa1566a926f11fb3f6b5b340665bc26028c4
[ "MIT" ]
38
2016-11-02T07:57:50.000Z
2022-01-22T13:25:14.000Z
build/lib/rowingdata/painsledplot.py
sanderroosendaal/rowingdata
efd8aa1566a926f11fb3f6b5b340665bc26028c4
[ "MIT" ]
6
2017-01-19T21:39:46.000Z
2021-11-16T14:48:58.000Z
#! /usr/bin/python from __future__ import absolute_import from __future__ import print_function from . import rowingdata from sys import argv def main(): readFile=argv[1] try: rowerFile=argv[2] except IndexError: rowerFile="defaultrower.txt" rower=rowingdata.getrower(rowerFile) r...
18.142857
62
0.661417
from __future__ import absolute_import from __future__ import print_function from . import rowingdata from sys import argv def main(): readFile=argv[1] try: rowerFile=argv[2] except IndexError: rowerFile="defaultrower.txt" rower=rowingdata.getrower(rowerFile) row=rowingdata.rowi...
true
true
f7fe56956ff351d8cb37de5c48d6b401354b13e6
212
py
Python
app/forms.py
ErikBoesen/afterthebeep
c4bafc4c6b90c8e43232e7b917f9184bfb7e6a06
[ "MIT" ]
null
null
null
app/forms.py
ErikBoesen/afterthebeep
c4bafc4c6b90c8e43232e7b917f9184bfb7e6a06
[ "MIT" ]
null
null
null
app/forms.py
ErikBoesen/afterthebeep
c4bafc4c6b90c8e43232e7b917f9184bfb7e6a06
[ "MIT" ]
null
null
null
from flask_wtf import FlaskForm from wtforms import TextAreaField from wtforms.validators import DataRequired class InputForm(FlaskForm): content = TextAreaField('Write here.', validators=[DataRequired()])
26.5
71
0.806604
from flask_wtf import FlaskForm from wtforms import TextAreaField from wtforms.validators import DataRequired class InputForm(FlaskForm): content = TextAreaField('Write here.', validators=[DataRequired()])
true
true
f7fe5705be91c29dfc3d7ae69d08e07664585877
9,558
py
Python
applications/BasketballAction/predict/eval.py
txyugood/PaddleTableTennis
be4d33b5990da9c75fcd11f341ae09a73bfdbaba
[ "Apache-2.0" ]
5
2022-01-30T07:35:58.000Z
2022-02-08T05:45:20.000Z
applications/BasketballAction/predict/eval.py
txyugood/PaddleTableTennis
be4d33b5990da9c75fcd11f341ae09a73bfdbaba
[ "Apache-2.0" ]
1
2022-01-14T02:33:28.000Z
2022-01-14T02:33:28.000Z
applications/BasketballAction/predict/eval.py
txyugood/PaddleTableTennis
be4d33b5990da9c75fcd11f341ae09a73bfdbaba
[ "Apache-2.0" ]
1
2022-03-07T10:51:21.000Z
2022-03-07T10:51:21.000Z
""" get instance for lstm 根据gts计算每个proposal_bmn的iou、ioa、label等信息 """ import os import sys import json import random import pickle import numpy as np import io sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding = 'utf-8') dataset = "datasets/" label_index_file = './configs_basketball/index_label_basketball_6.j...
39.991632
116
0.565076
import os import sys import json import random import pickle import numpy as np import io sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding = 'utf-8') dataset = "datasets/" label_index_file = './configs_basketball/index_label_basketball_6.json' eval_datasets = ['EuroCup2016'] label_files = {'train': 'label_c...
true
true
f7fe575f84224bf9dc7c3e775e916c4000f4985f
41,888
py
Python
query_by_free.py
liuKai0312/tyc_query
971aca447a801de53a52df4d3fb0af52bdf0a366
[ "MIT" ]
1
2022-03-25T22:25:46.000Z
2022-03-25T22:25:46.000Z
query_by_free.py
liuKai0312/tyc_query
971aca447a801de53a52df4d3fb0af52bdf0a366
[ "MIT" ]
1
2022-03-26T08:31:04.000Z
2022-03-26T08:31:04.000Z
query_by_free.py
liuKai0312/tyc_query
971aca447a801de53a52df4d3fb0af52bdf0a366
[ "MIT" ]
1
2021-10-08T09:32:26.000Z
2021-10-08T09:32:26.000Z
import sys import time import importlib import urllib import urllib.request import requests from bs4 import BeautifulSoup import pymysql import numpy as np import threading import redis from fake_useragent import UserAgent import math db_ = redis.Redis(host="localhost",password=123, port=6379,decode_responses=True) ...
40.199616
1,072
0.562333
import sys import time import importlib import urllib import urllib.request import requests from bs4 import BeautifulSoup import pymysql import numpy as np import threading import redis from fake_useragent import UserAgent import math db_ = redis.Redis(host="localhost",password=123, port=6379,decode_responses=True) ...
false
true
f7fe58318b4bf438cd9c0ae887db715050a26b70
114
py
Python
QuestoesBeecrowd-Iniciante/1006.py
AtosNeves/Beecrowd
f1192218eac3f6300290fe8234bbc720e9fb859e
[ "MIT" ]
null
null
null
QuestoesBeecrowd-Iniciante/1006.py
AtosNeves/Beecrowd
f1192218eac3f6300290fe8234bbc720e9fb859e
[ "MIT" ]
null
null
null
QuestoesBeecrowd-Iniciante/1006.py
AtosNeves/Beecrowd
f1192218eac3f6300290fe8234bbc720e9fb859e
[ "MIT" ]
null
null
null
a = float(input()) b = float(input()) c = float(input()) d = (a*2+b*3+c*5)/10 print("MEDIA = {:.1f}".format(d))
14.25
33
0.535088
a = float(input()) b = float(input()) c = float(input()) d = (a*2+b*3+c*5)/10 print("MEDIA = {:.1f}".format(d))
true
true
f7fe5867564219630cc49ea38853f6e1d85ebff6
72
py
Python
learn.py
python1803supera/helloteam
d21892abf0f9acc14efa758a502f10a63dddca8e
[ "Apache-2.0" ]
null
null
null
learn.py
python1803supera/helloteam
d21892abf0f9acc14efa758a502f10a63dddca8e
[ "Apache-2.0" ]
null
null
null
learn.py
python1803supera/helloteam
d21892abf0f9acc14efa758a502f10a63dddca8e
[ "Apache-2.0" ]
null
null
null
print("tiancai") print("提升自己才有选择否则就是刀俎我为鱼肉“) print("团队合作")
14.4
27
0.611111
print("tiancai") print("提升自己才有选择否则就是刀俎我为鱼肉“) print("团队合作")
false
true
f7fe58a7a30039bc8ccff21f6d166ba1814e1590
10,475
py
Python
test/test_download_file.py
lvarin/ega-download-client
bcbf0922af8bcea51ae62a3278b42c1491589923
[ "Apache-2.0" ]
null
null
null
test/test_download_file.py
lvarin/ega-download-client
bcbf0922af8bcea51ae62a3278b42c1491589923
[ "Apache-2.0" ]
null
null
null
test/test_download_file.py
lvarin/ega-download-client
bcbf0922af8bcea51ae62a3278b42c1491589923
[ "Apache-2.0" ]
null
null
null
import hashlib import math import os import tempfile from collections import namedtuple from unittest import mock import pytest from pyega3.libs.data_file import DataFile OUTPUT_DIR = tempfile.gettempdir() @pytest.fixture def mock_writing_files(): files = {} def open_wrapper(filename, mode): filen...
46.763393
151
0.696325
import hashlib import math import os import tempfile from collections import namedtuple from unittest import mock import pytest from pyega3.libs.data_file import DataFile OUTPUT_DIR = tempfile.gettempdir() @pytest.fixture def mock_writing_files(): files = {} def open_wrapper(filename, mode): filen...
true
true
f7fe5966a212cd9768a987ff1101f6223819bf6b
25,117
py
Python
Experiment.py
Stiltstiltstilts/Experiment-5
b10e6bbfd0ebd5ee73c09a4ab9387ea1f9967048
[ "MIT" ]
null
null
null
Experiment.py
Stiltstiltstilts/Experiment-5
b10e6bbfd0ebd5ee73c09a4ab9387ea1f9967048
[ "MIT" ]
null
null
null
Experiment.py
Stiltstiltstilts/Experiment-5
b10e6bbfd0ebd5ee73c09a4ab9387ea1f9967048
[ "MIT" ]
null
null
null
################################################ ################# Imports ###################### ################################################ from psychopy import core, visual, logging, gui, event, prefs, data, sound, monitors prefs.general['audioLib'] = ['pyo'] prefs.general['audioDriver'] = ['ASIO'] from numpy....
40.84065
151
0.504638
true
true
f7fe59a8e3c9d74b0b4ed8b384776f8f61a3d9fe
1,848
py
Python
plugin.video.vstream/resources/hosters/filepup.py
akuala/REPO.KUALA
ea9a157025530d2ce8fa0d88431c46c5352e89d4
[ "Apache-2.0" ]
2
2018-11-02T19:55:30.000Z
2020-08-14T02:22:20.000Z
plugin.video.vstream/resources/hosters/filepup.py
akuala/REPO.KUALA
ea9a157025530d2ce8fa0d88431c46c5352e89d4
[ "Apache-2.0" ]
null
null
null
plugin.video.vstream/resources/hosters/filepup.py
akuala/REPO.KUALA
ea9a157025530d2ce8fa0d88431c46c5352e89d4
[ "Apache-2.0" ]
3
2019-12-17T20:47:00.000Z
2021-02-11T19:03:59.000Z
#-*- coding: utf-8 -*- #Vstream https://github.com/Kodi-vStream/venom-xbmc-addons from resources.lib.handler.requestHandler import cRequestHandler from resources.lib.parser import cParser from resources.hosters.hoster import iHoster class cHoster(iHoster): def __init__(self): self.__sDisplayName = 'FileP...
24.315789
138
0.631494
from resources.lib.handler.requestHandler import cRequestHandler from resources.lib.parser import cParser from resources.hosters.hoster import iHoster class cHoster(iHoster): def __init__(self): self.__sDisplayName = 'FilePup' self.__sFileName = self.__sDisplayName self.__sHD = '' ...
true
true
f7fe5b8bf0510d3941196ee8bb5f769dededdabe
8,462
py
Python
07ctc_att_mtl/attention.py
sotuken2021/s
2b37fdcaa60c1f5ac492edddd4a0960882fbc0aa
[ "MIT" ]
41
2021-05-19T15:04:19.000Z
2022-02-11T15:24:58.000Z
07ctc_att_mtl/attention.py
sotuken2021/s
2b37fdcaa60c1f5ac492edddd4a0960882fbc0aa
[ "MIT" ]
1
2021-07-19T08:59:36.000Z
2021-07-25T07:54:29.000Z
07ctc_att_mtl/attention.py
sotuken2021/s
2b37fdcaa60c1f5ac492edddd4a0960882fbc0aa
[ "MIT" ]
14
2021-05-21T05:47:22.000Z
2022-03-31T09:11:32.000Z
# -*- coding: utf-8 -*- # # Attention (Location aware attention) の実装です. # 参考文献 # - D. Bahdanau, et al., # ``End-to-end attention-based large vocabulary speech # recognition,'' # in Proc. ICASSP, 2016. # - J. Chorowski, et al., # ``Attention-based models for speech recognition,'' # in Proc. N...
33.713147
78
0.549397
import torch import torch.nn as nn import torch.nn.functional as F class LocationAwareAttention(nn.Module): def __init__(self, dim_encoder, dim_decoder, dim_attention, filter_size, filter_num, tem...
true
true
f7fe5c024f10872ce3b44df612f8f69b4e0273a2
2,884
py
Python
CoffeeMachine/main.py
Wilhit/Coffee-Machine-Projects
7d1e5b02424f434c373f768594a43ec3075d5018
[ "MIT" ]
1
2022-01-28T01:09:30.000Z
2022-01-28T01:09:30.000Z
CoffeeMachine/main.py
Wilhit/Coffee-Machine-Projects
7d1e5b02424f434c373f768594a43ec3075d5018
[ "MIT" ]
null
null
null
CoffeeMachine/main.py
Wilhit/Coffee-Machine-Projects
7d1e5b02424f434c373f768594a43ec3075d5018
[ "MIT" ]
null
null
null
MENU = { "espresso": { "ingredients": { "water": 50, "coffee": 18, }, "cost": 15.5, }, "latte": { "ingredients": { "water": 200, "milk": 150, "coffee": 24, }, "cost": 20.0, }, ...
28.27451
80
0.532594
MENU = { "espresso": { "ingredients": { "water": 50, "coffee": 18, }, "cost": 15.5, }, "latte": { "ingredients": { "water": 200, "milk": 150, "coffee": 24, }, "cost": 20.0, }, ...
true
true