hexsha stringlengths 40 40 | size int64 7 1.04M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 247 | max_stars_repo_name stringlengths 4 125 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 368k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 4 247 | max_issues_repo_name stringlengths 4 125 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 4 247 | max_forks_repo_name stringlengths 4 125 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 1 1.04M | avg_line_length float64 1.77 618k | max_line_length int64 1 1.02M | alphanum_fraction float64 0 1 | original_content stringlengths 7 1.04M | filtered:remove_function_no_docstring int64 -102 942k | filtered:remove_class_no_docstring int64 -354 977k | filtered:remove_delete_markers int64 0 60.1k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
4e548b6e5f6f7fdebe32170e77f2b74e9b66fa62 | 4,826 | py | Python | torchmdnet/datasets/ani1.py | raimis/torchmd-net | b9785d203d0f1e30798db44c1abfeeb7f5dc2eac | [
"MIT"
] | null | null | null | torchmdnet/datasets/ani1.py | raimis/torchmd-net | b9785d203d0f1e30798db44c1abfeeb7f5dc2eac | [
"MIT"
] | null | null | null | torchmdnet/datasets/ani1.py | raimis/torchmd-net | b9785d203d0f1e30798db44c1abfeeb7f5dc2eac | [
"MIT"
] | null | null | null | import h5py
import numpy as np
import os
import torch as pt
from torch_geometric.data import Data, Dataset, download_url, extract_tar
from tqdm import tqdm
| 36.285714 | 130 | 0.597182 | import h5py
import numpy as np
import os
import torch as pt
from torch_geometric.data import Data, Dataset, download_url, extract_tar
from tqdm import tqdm
class ANI1(Dataset):
HARTREE_TO_EV = 27.211386246
raw_url = 'https://ndownloader.figshare.com/files/9057631'
atomic_numbers = {b'H': 1, b'C': 6, b'N... | 4,010 | 637 | 23 |
e0fd27db80019587e501e65dd937b6d7e19d2f78 | 1,052 | py | Python | tests/keepgoing/keepgoing_smtc.py | YosysHQ/sby | d10e472edf4ea9be3aa6347b264ba575fbea933a | [
"0BSD"
] | 14 | 2021-12-22T23:59:18.000Z | 2022-03-26T14:13:18.000Z | tests/keepgoing/keepgoing_smtc.py | YosysHQ/sby | d10e472edf4ea9be3aa6347b264ba575fbea933a | [
"0BSD"
] | 13 | 2022-01-11T18:07:40.000Z | 2022-03-31T10:42:19.000Z | tests/keepgoing/keepgoing_smtc.py | YosysHQ/sby | d10e472edf4ea9be3aa6347b264ba575fbea933a | [
"0BSD"
] | 2 | 2022-03-08T12:52:09.000Z | 2022-03-21T17:14:36.000Z | import sys
from check_output import *
workdir = sys.argv[1]
src = "keepgoing_same_step.sv"
assert_a = line_ref(workdir, src, "assert(a)")
assert_not_a = line_ref(workdir, src, "assert(!a)")
assert_0 = line_ref(workdir, src, "assert(0)")
assert_false = line_ref(workdir, "extra.smtc", "assert false")
assert_distinct =... | 40.461538 | 107 | 0.696768 | import sys
from check_output import *
workdir = sys.argv[1]
src = "keepgoing_same_step.sv"
assert_a = line_ref(workdir, src, "assert(a)")
assert_not_a = line_ref(workdir, src, "assert(!a)")
assert_0 = line_ref(workdir, src, "assert(0)")
assert_false = line_ref(workdir, "extra.smtc", "assert false")
assert_distinct =... | 0 | 0 | 0 |
2e54b7a573a5ba7cb864e05235a21c0ef097ec7f | 27,408 | py | Python | make_prg/make_prg_from_msa.py | martinghunt/make_prg | 86dbeebd02a7d7350700cd65874e244130aeda9a | [
"MIT"
] | null | null | null | make_prg/make_prg_from_msa.py | martinghunt/make_prg | 86dbeebd02a7d7350700cd65874e244130aeda9a | [
"MIT"
] | null | null | null | make_prg/make_prg_from_msa.py | martinghunt/make_prg | 86dbeebd02a7d7350700cd65874e244130aeda9a | [
"MIT"
] | null | null | null | import os
from Bio import AlignIO
from Bio.AlignIO import MultipleSeqAlignment
import logging
from sklearn.cluster import KMeans
import numpy as np
import gzip
from make_prg import utils
remove_duplicates = utils.remove_duplicates
contains_only = utils.contains_only
def get_interval_seqs(interval_alignment):
"""R... | 55.707317 | 176 | 0.561332 | import os
from Bio import AlignIO
from Bio.AlignIO import MultipleSeqAlignment
import logging
from sklearn.cluster import KMeans
import numpy as np
import gzip
from make_prg import utils
remove_duplicates = utils.remove_duplicates
contains_only = utils.contains_only
def get_interval_seqs(interval_alignment):
"""R... | 9,073 | 0 | 106 |
5a20ff39c8e140802ee50e344bbcc30c7ace2dbd | 7,598 | py | Python | trainOps.py | ricvolpi/generalize-unseen-domains | 99325ba9adce1a316b4994e7451657e5ec87d5a7 | [
"MIT"
] | 113 | 2018-09-14T14:46:02.000Z | 2022-03-16T17:52:17.000Z | trainOps.py | ricvolpi/generalize-unseen-domains | 99325ba9adce1a316b4994e7451657e5ec87d5a7 | [
"MIT"
] | 1 | 2018-12-13T15:22:02.000Z | 2021-05-18T06:30:11.000Z | trainOps.py | ricvolpi/generalize-unseen-domains | 99325ba9adce1a316b4994e7451657e5ec87d5a7 | [
"MIT"
] | 17 | 2018-09-15T21:55:42.000Z | 2021-08-31T06:45:04.000Z | import tensorflow as tf
import tensorflow.contrib.slim as slim
import numpy as np
import numpy.random as npr
from ConfigParser import *
import os
import cPickle
import scipy.io
import sys
import glob
from numpy.linalg import norm
from scipy import misc
import utils
if __name__=='__main__':
print '...'
| 35.671362 | 185 | 0.729402 | import tensorflow as tf
import tensorflow.contrib.slim as slim
import numpy as np
import numpy.random as npr
from ConfigParser import *
import os
import cPickle
import scipy.io
import sys
import glob
from numpy.linalg import norm
from scipy import misc
import utils
class TrainOps(object):
def __init__(self, mode... | 7,063 | 2 | 220 |
504a6b8e3f2d53545cf22926ac4fc990768b1c95 | 1,282 | py | Python | bdl_query.py | ppiatkowski/bdl-gus-playground | 1f5410b3757fe24525558cc315572e7ceb972fda | [
"MIT"
] | null | null | null | bdl_query.py | ppiatkowski/bdl-gus-playground | 1f5410b3757fe24525558cc315572e7ceb972fda | [
"MIT"
] | null | null | null | bdl_query.py | ppiatkowski/bdl-gus-playground | 1f5410b3757fe24525558cc315572e7ceb972fda | [
"MIT"
] | null | null | null | #!/usr/bin/python3
from bdl_requests.bdl_request import *
from logger import logger
| 27.869565 | 94 | 0.559282 | #!/usr/bin/python3
from bdl_requests.bdl_request import *
from logger import logger
class BDLMultiVariableQuery(object):
def __init__(self, variables, city, year):
self.variables = variables
self.city = city
self.year = year
def execute(self):
vals = []
for variable i... | 1,017 | 26 | 152 |
028b3181691616057174c1e12d0edbaf9852fa98 | 2,466 | py | Python | app/models/rais.py | DataViva/dataviva-api | 5d2756b1003695038be32f58b43b11f5ed3e358e | [
"MIT"
] | 14 | 2017-05-14T00:05:16.000Z | 2020-05-27T22:36:41.000Z | app/models/rais.py | DataViva/dataviva-api | 5d2756b1003695038be32f58b43b11f5ed3e358e | [
"MIT"
] | 44 | 2016-12-21T17:18:05.000Z | 2019-03-15T02:43:41.000Z | app/models/rais.py | DataViva/dataviva-api | 5d2756b1003695038be32f58b43b11f5ed3e358e | [
"MIT"
] | 7 | 2017-01-03T17:49:30.000Z | 2019-09-20T00:47:25.000Z | from sqlalchemy import Column, Integer, String, Numeric, func, distinct, Boolean
from app import db
| 33.324324 | 85 | 0.587997 | from sqlalchemy import Column, Integer, String, Numeric, func, distinct, Boolean
from app import db
class Rais(db.Model):
__tablename__ = 'rais'
region = Column(String(1), primary_key=True)
mesoregion = Column(String(4), primary_key=True)
microregion = Column(String(5), primary_key=True)
state = C... | 1,069 | 1,273 | 23 |
53b354c028acadeebd22150ab1c00c9a7022be0d | 570 | py | Python | examples/fetch_scp_173.py | CSharperMantle/scp-fetcher-bs4 | 16d4c9b743c617abf145506151eb076ece4cb143 | [
"MIT"
] | 1 | 2021-04-04T05:38:12.000Z | 2021-04-04T05:38:12.000Z | examples/fetch_scp_173.py | CSharperMantle/scp_fetcher_bs4 | 16d4c9b743c617abf145506151eb076ece4cb143 | [
"MIT"
] | null | null | null | examples/fetch_scp_173.py | CSharperMantle/scp_fetcher_bs4 | 16d4c9b743c617abf145506151eb076ece4cb143 | [
"MIT"
] | null | null | null | from scp_fetcher_bs4.scp_info import SCPInfo, SCPParsingError
import requests
_TEMPLATE = """
Information about SCP-{0}:
\tObject Class: {1}
"""
def fetch_scp_173():
"""
Fetch the information about SCP-173 from http://scp-wiki.wikidot.com
"""
req = requests.get('http://scp-wiki.wikidot.com/scp-173')... | 20.357143 | 72 | 0.675439 | from scp_fetcher_bs4.scp_info import SCPInfo, SCPParsingError
import requests
_TEMPLATE = """
Information about SCP-{0}:
\tObject Class: {1}
"""
def fetch_scp_173():
"""
Fetch the information about SCP-173 from http://scp-wiki.wikidot.com
"""
req = requests.get('http://scp-wiki.wikidot.com/scp-173')... | 0 | 0 | 0 |
179491ffc82ce7ac2161bf57b7bf6c5238a686f5 | 4,795 | py | Python | fcis/operator_py/graph_cut.py | jeremy43/FCIS | 0ed234c14d064b615d6c2553edca24031b8c7c84 | [
"Apache-2.0"
] | null | null | null | fcis/operator_py/graph_cut.py | jeremy43/FCIS | 0ed234c14d064b615d6c2553edca24031b8c7c84 | [
"Apache-2.0"
] | null | null | null | fcis/operator_py/graph_cut.py | jeremy43/FCIS | 0ed234c14d064b615d6c2553edca24031b8c7c84 | [
"Apache-2.0"
] | null | null | null | # --------------------------------------------------------
#
# Copyright (c) 2017 Microsoft
# Licensed under The Apache-2.0 License [see LICENSE for details]
# Written by Shuhao Fu
# --------------------------------------------------------
"""
Proposal Target Operator selects foreground and background roi and ... | 42.061404 | 148 | 0.559124 | # --------------------------------------------------------
#
# Copyright (c) 2017 Microsoft
# Licensed under The Apache-2.0 License [see LICENSE for details]
# Written by Shuhao Fu
# --------------------------------------------------------
"""
Proposal Target Operator selects foreground and background roi and ... | 3,909 | 48 | 305 |
bb995ef516eb86dc3916d53f5c2e9f2ce04d40a8 | 2,017 | py | Python | common/geometery_test.py | jcl5m1/CVToolsPython | 02f5911abbc6463c96c12a55acb043230dc2b30c | [
"Apache-2.0"
] | 3 | 2015-05-12T08:01:46.000Z | 2020-08-15T08:56:25.000Z | common/geometery_test.py | jcl5m1/CVToolsPython | 02f5911abbc6463c96c12a55acb043230dc2b30c | [
"Apache-2.0"
] | null | null | null | common/geometery_test.py | jcl5m1/CVToolsPython | 02f5911abbc6463c96c12a55acb043230dc2b30c | [
"Apache-2.0"
] | 1 | 2020-03-30T09:02:45.000Z | 2020-03-30T09:02:45.000Z | __author__ = 'johnnylee'
import geometery as geo
import random
import matplotlib
matplotlib.use('Qt4Agg')
import matplotlib.pyplot as plt
import numpy as np
import math
import transformations as xforms
import sys
points = np.zeros((4, 2))
fig = plt.figure()
ax = fig.add_subplot(111, aspect='equal', xlim=(0, 1), ylim... | 24.901235 | 85 | 0.661874 | __author__ = 'johnnylee'
import geometery as geo
import random
import matplotlib
matplotlib.use('Qt4Agg')
import matplotlib.pyplot as plt
import numpy as np
import math
import transformations as xforms
import sys
points = np.zeros((4, 2))
fig = plt.figure()
ax = fig.add_subplot(111, aspect='equal', xlim=(0, 1), ylim... | 1,033 | 0 | 69 |
a1b3e09eea57315dbff69ecb4a21d733728fc5da | 19,957 | py | Python | momba/model/context.py | koehlma/momba | 68d6431d2732570696d3c67a9e23006e6e3a7740 | [
"MIT"
] | 12 | 2021-01-18T14:38:32.000Z | 2022-01-17T09:16:52.000Z | momba/model/context.py | koehlma/momba | 68d6431d2732570696d3c67a9e23006e6e3a7740 | [
"MIT"
] | 3 | 2021-05-16T15:26:34.000Z | 2022-02-21T20:46:55.000Z | momba/model/context.py | koehlma/momba | 68d6431d2732570696d3c67a9e23006e6e3a7740 | [
"MIT"
] | null | null | null | # -*- coding:utf-8 -*-
#
# Copyright (C) 2019-2021, Saarland University
# Copyright (C) 2019-2021, Maximilian Köhl <koehl@cs.uni-saarland.de>
from __future__ import annotations
import dataclasses as d
import typing as t
import collections
import enum
from . import actions, errors, functions, expressions, types
fro... | 30.468702 | 94 | 0.612166 | # -*- coding:utf-8 -*-
#
# Copyright (C) 2019-2021, Saarland University
# Copyright (C) 2019-2021, Maximilian Köhl <koehl@cs.uni-saarland.de>
from __future__ import annotations
import dataclasses as d
import typing as t
import collections
import enum
from . import actions, errors, functions, expressions, types
fro... | 1,674 | 0 | 216 |
38f8473d78176bc1f32cdcfbebfe93d331b34287 | 358 | py | Python | comunicados/migrations/0014_auto_20180125_1055.py | MonkeyAndres/AlexioProject | 561fdbbfb561bb2ee40c6e90696ba4759029959d | [
"MIT"
] | null | null | null | comunicados/migrations/0014_auto_20180125_1055.py | MonkeyAndres/AlexioProject | 561fdbbfb561bb2ee40c6e90696ba4759029959d | [
"MIT"
] | null | null | null | comunicados/migrations/0014_auto_20180125_1055.py | MonkeyAndres/AlexioProject | 561fdbbfb561bb2ee40c6e90696ba4759029959d | [
"MIT"
] | null | null | null | # Generated by Django 2.0.1 on 2018-01-25 10:55
from django.db import migrations
| 19.888889 | 51 | 0.625698 | # Generated by Django 2.0.1 on 2018-01-25 10:55
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('comunicados', '0013_auto_20171211_1020'),
]
operations = [
migrations.RenameModel(
old_name='DocumentoComunicado',
new_name=... | 0 | 252 | 23 |
374eaf0a682a8b46c44a35d2f12edd86ef24bcb3 | 4,847 | py | Python | tatsumakibot.py | boosungkim/TatsuBot | 36d4afce6bc637150876d99caa35c27f1104835c | [
"MIT"
] | 1 | 2019-06-23T13:18:01.000Z | 2019-06-23T13:18:01.000Z | tatsumakibot.py | boosungkim/TatsuBot | 36d4afce6bc637150876d99caa35c27f1104835c | [
"MIT"
] | 1 | 2021-06-01T23:51:54.000Z | 2021-06-01T23:51:54.000Z | tatsumakibot.py | boosungkim/TatsuBot | 36d4afce6bc637150876d99caa35c27f1104835c | [
"MIT"
] | null | null | null | import praw
import time
from praw.exceptions import APIException
import re
# The main functions of the bot
print("About to run bot")
if __name__ == "__main__":
cache = []
main()
| 51.56383 | 185 | 0.605323 | import praw
import time
from praw.exceptions import APIException
import re
def authenticate():
print("Authenticating...")
reddit = praw.Reddit(
'TatsuBot',
user_agent="Tatsumaki comment responder v1.2.2")
print("Authenticated as {}!".format(reddit.user.me()... | 4,587 | 0 | 68 |
4fde2ea7677f133543989507f8af5071795b4f02 | 970 | py | Python | tests/e2e/test_tags_api.py | Tserewara/dama-rowahutu | 9f8d0ecfa8760cf25efb343472734042a4b2fa15 | [
"MIT"
] | 2 | 2021-03-19T11:19:14.000Z | 2021-05-04T19:02:34.000Z | tests/e2e/test_tags_api.py | Tserewara/dama-rowahutu | 9f8d0ecfa8760cf25efb343472734042a4b2fa15 | [
"MIT"
] | null | null | null | tests/e2e/test_tags_api.py | Tserewara/dama-rowahutu | 9f8d0ecfa8760cf25efb343472734042a4b2fa15 | [
"MIT"
] | 1 | 2021-03-03T17:33:12.000Z | 2021-03-03T17:33:12.000Z | import pytest
import requests
from src.articles import config
from tests.e2e.fake_authentication import authenticate
@pytest.mark.usefixtures('restart_api')
@pytest.mark.usefixtures('restart_api')
| 24.871795 | 75 | 0.717526 | import pytest
import requests
from src.articles import config
from tests.e2e.fake_authentication import authenticate
@pytest.mark.usefixtures('restart_api')
def test_happy_path_post_returns_201_and_tag_name(postgres_session):
url = config.get_api_url()
fake_session = requests.Session()
authenticate(fak... | 724 | 0 | 44 |
8c41beca163efaf1a35c57412fdbbf8b236afbc1 | 758 | py | Python | function/migrations/0003_auto_20210223_2023.py | 160012/EDAS | 25c98187cd4dc24e45dc9b305760b4451c76afb7 | [
"MIT"
] | null | null | null | function/migrations/0003_auto_20210223_2023.py | 160012/EDAS | 25c98187cd4dc24e45dc9b305760b4451c76afb7 | [
"MIT"
] | null | null | null | function/migrations/0003_auto_20210223_2023.py | 160012/EDAS | 25c98187cd4dc24e45dc9b305760b4451c76afb7 | [
"MIT"
] | null | null | null | # Generated by Django 3.1.4 on 2021-02-23 12:23
from django.db import migrations, models
| 26.137931 | 81 | 0.580475 | # Generated by Django 3.1.4 on 2021-02-23 12:23
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('function', '0002_curriculum_method'),
]
operations = [
migrations.AddField(
model_name='curriculum',
name='id',
... | 0 | 656 | 23 |
a8768925d360b3fa33286df29995237f80ab58b0 | 10,576 | py | Python | Project2_logic/logicPlan.py | mtroym/CS181-CS-188-UCB- | e84d1d5118a0a8864ba0c44dd17777699c28c123 | [
"MIT"
] | 3 | 2021-06-17T07:34:16.000Z | 2022-02-21T16:45:27.000Z | Project2_logic/logicPlan.py | MTonyM/CS181-CS-188-UCB- | e84d1d5118a0a8864ba0c44dd17777699c28c123 | [
"MIT"
] | null | null | null | Project2_logic/logicPlan.py | MTonyM/CS181-CS-188-UCB- | e84d1d5118a0a8864ba0c44dd17777699c28c123 | [
"MIT"
] | 1 | 2020-10-01T14:32:04.000Z | 2020-10-01T14:32:04.000Z | # logicPlan.py
# ------------
# Licensing Information: You are free to use or extend these projects for
# educational purposes provided that (1) you do not distribute or publish
# solutions, (2) you retain this notice, and (3) you provide clear
# attribution to UC Berkeley, including a link to http://ai.berkeley.edu.
... | 36.095563 | 154 | 0.627553 | # logicPlan.py
# ------------
# Licensing Information: You are free to use or extend these projects for
# educational purposes provided that (1) you do not distribute or publish
# solutions, (2) you retain this notice, and (3) you provide clear
# attribution to UC Berkeley, including a link to http://ai.berkeley.edu.
... | 0 | 0 | 0 |
5a1d316ed31d577c7df6547d9741c2b872bd048d | 1,650 | py | Python | pyseries/Pipelines/AnalyzeRest.py | ryscet/pySeries | 3ab1e0a9dbdeaef34c6c6d1fed5b248203c84fea | [
"MIT"
] | 1 | 2019-01-23T08:59:51.000Z | 2019-01-23T08:59:51.000Z | pyseries/Pipelines/AnalyzeRest.py | ryscet/pySeries | 3ab1e0a9dbdeaef34c6c6d1fed5b248203c84fea | [
"MIT"
] | null | null | null | pyseries/Pipelines/AnalyzeRest.py | ryscet/pySeries | 3ab1e0a9dbdeaef34c6c6d1fed5b248203c84fea | [
"MIT"
] | 3 | 2016-11-04T14:15:58.000Z | 2016-11-10T22:31:10.000Z | # -*- coding: utf-8 -*-
"""
Created on Tue Jun 7 12:32:36 2016
@author: user
"""
import sys
sys.path.insert(0, '/Users/user/Desktop/repo_for_pyseries/pyseries/')
import pyseries.LoadingData as loading
import pyseries.Preprocessing as prep
import pyseries.Analysis as analysis
| 40.243902 | 180 | 0.649697 | # -*- coding: utf-8 -*-
"""
Created on Tue Jun 7 12:32:36 2016
@author: user
"""
import sys
sys.path.insert(0, '/Users/user/Desktop/repo_for_pyseries/pyseries/')
import pyseries.LoadingData as loading
import pyseries.Preprocessing as prep
import pyseries.Analysis as analysis
def plot_rest():
# paths = [ '/Use... | 1,347 | 0 | 23 |
e011322d4d992983b9251bbe8c19fce1714b74c3 | 692 | py | Python | dags/run_testprofile.py | consag/docker-airflow | eab7ed7ca1162e284023c19a16d1832a958b8f06 | [
"Apache-2.0"
] | 3 | 2019-11-10T19:08:26.000Z | 2021-05-15T17:56:19.000Z | dags/run_testprofile.py | consag/docker-airflow | eab7ed7ca1162e284023c19a16d1832a958b8f06 | [
"Apache-2.0"
] | 3 | 2020-10-28T13:14:43.000Z | 2022-03-01T23:11:48.000Z | dags/run_testprofile.py | consag/docker-airflow | eab7ed7ca1162e284023c19a16d1832a958b8f06 | [
"Apache-2.0"
] | null | null | null | """
Definition to run a test profile
"""
from datetime import datetime, timedelta
from airflow import DAG
from InformaticaPlugin import ExecuteProfile
schedule_interval = None
default_args = {
'owner': 'Jac. Beekers',
'depends_on_past': False,
'email': ['noone@nowhere.no'],
'email_on_failure': False... | 20.969697 | 58 | 0.703757 | """
Definition to run a test profile
"""
from datetime import datetime, timedelta
from airflow import DAG
from InformaticaPlugin import ExecuteProfile
schedule_interval = None
default_args = {
'owner': 'Jac. Beekers',
'depends_on_past': False,
'email': ['noone@nowhere.no'],
'email_on_failure': False... | 0 | 0 | 0 |
2cdfd1fd6d51fdc5aac9bdc94e54b3c4f4ee9b9c | 1,400 | py | Python | run_attacker.py | hotpxl/low-rate-tcp-dos | 25cf181080e4ff759edef438982b5e3d811797e7 | [
"MIT"
] | 3 | 2018-06-11T05:34:05.000Z | 2020-11-06T05:23:34.000Z | run_attacker.py | hotpxl/low-rate-tcp-dos | 25cf181080e4ff759edef438982b5e3d811797e7 | [
"MIT"
] | 1 | 2021-11-09T12:25:13.000Z | 2021-11-09T12:25:13.000Z | run_attacker.py | hotpxl/low-rate-tcp-dos | 25cf181080e4ff759edef438982b5e3d811797e7 | [
"MIT"
] | 4 | 2019-08-24T12:55:53.000Z | 2022-03-07T12:03:33.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import os
import socket
import time
import argparse
if __name__ == '__main__':
main()
| 27.45098 | 78 | 0.637857 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import os
import socket
import time
import argparse
def send_burst(sock, target, burst):
start = time.time()
payload = '0' * 128
while time.time() - s... | 1,105 | 0 | 46 |
78e801b50319f40a28b28507953755bfdc2ee35e | 3,566 | py | Python | tests/test_params.py | OctaveLauby/olutils | 9d0741fe2a3ce527be60be2bf1a6904c3340e488 | [
"Apache-2.0"
] | 1 | 2020-10-23T17:11:42.000Z | 2020-10-23T17:11:42.000Z | tests/test_params.py | OctaveLauby/olutils | 9d0741fe2a3ce527be60be2bf1a6904c3340e488 | [
"Apache-2.0"
] | 4 | 2019-05-09T12:53:33.000Z | 2020-12-03T13:49:26.000Z | tests/test_params.py | OctaveLauby/olutils | 9d0741fe2a3ce527be60be2bf1a6904c3340e488 | [
"Apache-2.0"
] | null | null | null | from argparse import ArgumentParser
from collections import OrderedDict
import pytest
import olutils as lib
import olutils.params as lib2
| 26.81203 | 82 | 0.47364 | from argparse import ArgumentParser
from collections import OrderedDict
import pytest
import olutils as lib
import olutils.params as lib2
def test_check_type():
assert lib2.check_type("arg", 1, int) is None
assert lib2.check_type("arg", "hello", str) is None
assert lib2.check_type("arg", 1., float) is No... | 3,307 | 0 | 115 |
79a351fc6df21077d7cfd1a4c97ce3e907c26e43 | 594 | py | Python | waterspout_api/migrations/0030_auto_20210429_1758.py | Water-Systems-Management-UCM/Waterspout | 78965f1e53b09f442e278dff72c290ceac22ed60 | [
"MIT"
] | 1 | 2020-09-10T20:43:24.000Z | 2020-09-10T20:43:24.000Z | waterspout_api/migrations/0030_auto_20210429_1758.py | Water-Systems-Management-UCM/Waterspout | 78965f1e53b09f442e278dff72c290ceac22ed60 | [
"MIT"
] | 72 | 2020-05-28T17:20:12.000Z | 2022-03-28T14:11:40.000Z | waterspout_api/migrations/0030_auto_20210429_1758.py | Water-Systems-Management-UCM/Waterspout | 78965f1e53b09f442e278dff72c290ceac22ed60 | [
"MIT"
] | null | null | null | # Generated by Django 3.2 on 2021-04-30 00:58
from django.db import migrations, models
import django.db.models.deletion
| 28.285714 | 178 | 0.666667 | # Generated by Django 3.2 on 2021-04-30 00:58
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('waterspout_api', '0029_auto_20210428_1715'),
]
operations = [
migrations.AddField(
model_name='mo... | 0 | 449 | 23 |
5b3c122cbbdd9e1576c139b4ef78c5ac7723b41a | 374 | py | Python | bigO.py | prabhugs/scripts | 113965717f96229d4c7f37bb324623ed80d45b02 | [
"Apache-2.0",
"MIT"
] | null | null | null | bigO.py | prabhugs/scripts | 113965717f96229d4c7f37bb324623ed80d45b02 | [
"Apache-2.0",
"MIT"
] | null | null | null | bigO.py | prabhugs/scripts | 113965717f96229d4c7f37bb324623ed80d45b02 | [
"Apache-2.0",
"MIT"
] | null | null | null | import timeit
import random
for i in range (10000, 100000, 20000):
t = timeit.Timer("random.randrange(%d) in x"%i, "from __main__ import random, x")
x = list(range(i))
list_time = t.timeit(number = 1000)
x = {j:None for j in range(i)}
dict_time = t.timeit(number = 1000)
print "Counter: " + str(i) + " L... | 26.714286 | 88 | 0.63369 | import timeit
import random
for i in range (10000, 100000, 20000):
t = timeit.Timer("random.randrange(%d) in x"%i, "from __main__ import random, x")
x = list(range(i))
list_time = t.timeit(number = 1000)
x = {j:None for j in range(i)}
dict_time = t.timeit(number = 1000)
print "Counter: " + str(i) + " L... | 0 | 0 | 0 |
32d8bf0c0b9f39c301a1d44fd2f3eec542b96e62 | 3,436 | py | Python | rl_coach/filters/action/attention_discretization.py | abcp4/coach | e0f1b9ecc884ffea71ba634986d478f4fc150d3e | [
"Apache-2.0"
] | 3 | 2019-11-15T02:05:38.000Z | 2020-10-10T17:15:40.000Z | rl_coach/filters/action/attention_discretization.py | gndctrl2mjrtm/coach-ray | ae6593bb33cf0ae3c5a4b3b351560dd6b47cd031 | [
"Apache-2.0"
] | null | null | null | rl_coach/filters/action/attention_discretization.py | gndctrl2mjrtm/coach-ray | ae6593bb33cf0ae3c5a4b3b351560dd6b47cd031 | [
"Apache-2.0"
] | null | null | null | #
# Copyright (c) 2017 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 51.283582 | 129 | 0.700233 | #
# Copyright (c) 2017 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 2,087 | 0 | 80 |
737094926aa531bdfd447a007d16b0aabbd3551b | 493 | py | Python | data/contacts.py | pvserge/python_traning | 069148647f00b634e0817dc3a92c32f677cc5b1e | [
"Apache-2.0"
] | null | null | null | data/contacts.py | pvserge/python_traning | 069148647f00b634e0817dc3a92c32f677cc5b1e | [
"Apache-2.0"
] | null | null | null | data/contacts.py | pvserge/python_traning | 069148647f00b634e0817dc3a92c32f677cc5b1e | [
"Apache-2.0"
] | null | null | null | from model.contact import Contact
testdata = [
Contact(firstname="", lastname="", address="", homephone="", mobilephone="", workphone="",
secondaryphone="", email1="", email2="", email3=""),
Contact(firstname="Ivan", lastname="Ivanov", address="SomeWhere St., 4", homephone="+111111111",
... | 49.3 | 100 | 0.64503 | from model.contact import Contact
testdata = [
Contact(firstname="", lastname="", address="", homephone="", mobilephone="", workphone="",
secondaryphone="", email1="", email2="", email3=""),
Contact(firstname="Ivan", lastname="Ivanov", address="SomeWhere St., 4", homephone="+111111111",
... | 0 | 0 | 0 |
c1ebc2221f962d846a59a8be181a9f42b3226060 | 9,665 | py | Python | dvha/tools/roi_formatter.py | cutright/DVH-Analytics | a168cf67709b7a60d0d311a294801954421c1ad1 | [
"Apache-2.0"
] | 98 | 2017-09-04T14:15:57.000Z | 2022-03-08T03:58:18.000Z | dvha/tools/roi_formatter.py | cutright/DVH-Analytics | a168cf67709b7a60d0d311a294801954421c1ad1 | [
"Apache-2.0"
] | 177 | 2017-06-01T14:25:15.000Z | 2022-01-10T03:23:15.000Z | dvha/tools/roi_formatter.py | cutright/DVH-Analytics | a168cf67709b7a60d0d311a294801954421c1ad1 | [
"Apache-2.0"
] | 31 | 2017-10-16T00:17:00.000Z | 2022-01-19T20:09:58.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# tools.roi_formatter.py
"""Formatting tools for roi data (dicompyler, Shapely, DVHA)"""
# Copyright (c) 2016-2019 Dan Cutright
# This file is part of DVH Analytics, released under a BSD license.
# See the file LICENSE included with this distribution, also
# availabl... | 28.343109 | 101 | 0.602069 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# tools.roi_formatter.py
"""Formatting tools for roi data (dicompyler, Shapely, DVHA)"""
# Copyright (c) 2016-2019 Dan Cutright
# This file is part of DVH Analytics, released under a BSD license.
# See the file LICENSE included with this distribution, also
# availabl... | 0 | 0 | 0 |
a6bf2dc40a857d2d0d763bf8451db8cd4609c8d9 | 1,912 | py | Python | scripts/summary/update_dailyrain.py | jamayfieldjr/iem | 275b77a65f3b12e26e6cbdb230786b9c7d2b9c9a | [
"MIT"
] | 1 | 2019-10-07T17:01:24.000Z | 2019-10-07T17:01:24.000Z | scripts/summary/update_dailyrain.py | jamayfieldjr/iem | 275b77a65f3b12e26e6cbdb230786b9c7d2b9c9a | [
"MIT"
] | null | null | null | scripts/summary/update_dailyrain.py | jamayfieldjr/iem | 275b77a65f3b12e26e6cbdb230786b9c7d2b9c9a | [
"MIT"
] | null | null | null | """Update the pday column
Some care has to be made here such that trace values do not accumulate when
there are actual measurable precip. Eventually, the DSM or other summary
messages come and overwrite the trouble. Run from RUN_10MIN.sh
"""
from __future__ import print_function
import datetime
from pyiem.util impor... | 31.344262 | 75 | 0.581067 | """Update the pday column
Some care has to be made here such that trace values do not accumulate when
there are actual measurable precip. Eventually, the DSM or other summary
messages come and overwrite the trouble. Run from RUN_10MIN.sh
"""
from __future__ import print_function
import datetime
from pyiem.util impor... | 0 | 0 | 0 |
cd35946b4f8f14bc78705923026cf0721aea5c3e | 2,167 | py | Python | raspisump/storage.py | bdevy/raspi-sump | 78d0101808e54ea091a43f9142cdc7d8c31804b0 | [
"MIT"
] | null | null | null | raspisump/storage.py | bdevy/raspi-sump | 78d0101808e54ea091a43f9142cdc7d8c31804b0 | [
"MIT"
] | null | null | null | raspisump/storage.py | bdevy/raspi-sump | 78d0101808e54ea091a43f9142cdc7d8c31804b0 | [
"MIT"
] | null | null | null | """ Module to send metrics to storage systems. """
# Raspi-sump, a sump pump monitoring system.
# Al Audet
# http://www.linuxnorth.org/raspi-sump/
#
# All configuration changes should be done in raspisump.conf
# MIT License -- http://www.linuxnorth.org/raspi-sump/license.html
import configparser
from raspisump import... | 31.867647 | 208 | 0.666359 | """ Module to send metrics to storage systems. """
# Raspi-sump, a sump pump monitoring system.
# Al Audet
# http://www.linuxnorth.org/raspi-sump/
#
# All configuration changes should be done in raspisump.conf
# MIT License -- http://www.linuxnorth.org/raspi-sump/license.html
import configparser
from raspisump import... | 0 | 0 | 0 |
e38b043b0fb7653614770e3534ff8ef561469017 | 492 | py | Python | userbot/plugins/idk.py | Declan57/SPARKZZZ | 4fb9ae8581b96a7040700ff1dc7244cd19f08e40 | [
"MIT"
] | 1 | 2020-10-04T10:08:43.000Z | 2020-10-04T10:08:43.000Z | userbot/plugins/idk.py | ranijithhub/SPARKZZZ | 4fcbd15d7466b71261f8b437b0654d9e5cde1b55 | [
"MIT"
] | null | null | null | userbot/plugins/idk.py | ranijithhub/SPARKZZZ | 4fcbd15d7466b71261f8b437b0654d9e5cde1b55 | [
"MIT"
] | null | null | null | # @ copyright SPARKZZZ
"""
idk
"""
from telethon.tl.functions.channels import LeaveChannelRequest
from userbot.utils import admin_cmd
import time
@sparkzzz.on(admin_cmd(pattern="idk", outgoing=True))
| 16.4 | 73 | 0.609756 | # @ copyright SPARKZZZ
"""
idk
"""
from telethon.tl.functions.channels import LeaveChannelRequest
from userbot.utils import admin_cmd
import time
@sparkzzz.on(admin_cmd(pattern="idk", outgoing=True))
async def leave(e):
if not e.text[0].isalpha() and e.text[0] not in ("/", "#", "@", "!"):
await e.... | 261 | 0 | 23 |
e67c4a0edde062391c71173ff626aed5257e140d | 22,830 | py | Python | bmm/src/inference/resampling.py | safarzadeh-reza/bmm | 7fbb0964c493c08243f0e1a627787d8d115259e6 | [
"MIT"
] | 1 | 2022-02-04T22:17:43.000Z | 2022-02-04T22:17:43.000Z | bmm/src/inference/resampling.py | safarzadeh-reza/bmm | 7fbb0964c493c08243f0e1a627787d8d115259e6 | [
"MIT"
] | null | null | null | bmm/src/inference/resampling.py | safarzadeh-reza/bmm | 7fbb0964c493c08243f0e1a627787d8d115259e6 | [
"MIT"
] | null | null | null | ########################################################################################################################
# Module: inference/resampling.py
# Description: Resampling schemes for converting weighted particles (series of positions/edges/distances) to
# unweighted. Notably multinomial resamplin... | 47.169421 | 120 | 0.589882 | ########################################################################################################################
# Module: inference/resampling.py
# Description: Resampling schemes for converting weighted particles (series of positions/edges/distances) to
# unweighted. Notably multinomial resamplin... | 0 | 0 | 0 |
eb1c8ab63d326f1a026329b6b62ed6cbcf180f73 | 9,503 | py | Python | environment/entities/robots.py | RubenPants/RobotSimulator2D | 334d7b9cab0edb22d4670cfaf39fbed76c351758 | [
"MIT"
] | null | null | null | environment/entities/robots.py | RubenPants/RobotSimulator2D | 334d7b9cab0edb22d4670cfaf39fbed76c351758 | [
"MIT"
] | null | null | null | environment/entities/robots.py | RubenPants/RobotSimulator2D | 334d7b9cab0edb22d4670cfaf39fbed76c351758 | [
"MIT"
] | null | null | null | """
robots.py
Robots used to manoeuvre around in the Game-environment.
"""
from numpy import pi, sqrt
from configs.bot_config import BotConfig
from environment.entities.sensors import AngularSensor, DeltaDistanceSensor, DistanceSensor, ProximitySensor
from utils.vec2d import angle_to_vec, Vec2d
class MarXBot:
"... | 42.424107 | 120 | 0.623172 | """
robots.py
Robots used to manoeuvre around in the Game-environment.
"""
from numpy import pi, sqrt
from configs.bot_config import BotConfig
from environment.entities.sensors import AngularSensor, DeltaDistanceSensor, DistanceSensor, ProximitySensor
from utils.vec2d import angle_to_vec, Vec2d
class MarXBot:
"... | 22 | 0 | 31 |
27457f3ce266a00b39179c2e98756df9f3271fb0 | 1,576 | py | Python | ozpcenter/models/intent.py | emosher/ozp-backend | d31d00bb8a28a8d0c999813f616b398f41516244 | [
"Apache-2.0"
] | 1 | 2018-10-05T17:03:01.000Z | 2018-10-05T17:03:01.000Z | ozpcenter/models/intent.py | emosher/ozp-backend | d31d00bb8a28a8d0c999813f616b398f41516244 | [
"Apache-2.0"
] | 1 | 2017-01-06T19:20:32.000Z | 2017-01-06T19:20:32.000Z | ozpcenter/models/intent.py | emosher/ozp-backend | d31d00bb8a28a8d0c999813f616b398f41516244 | [
"Apache-2.0"
] | 7 | 2016-12-16T15:42:05.000Z | 2020-09-05T01:11:27.000Z | from django.core.cache import cache
from django.core.validators import RegexValidator
from django.db import models
from django.db.models.signals import post_delete
from django.db.models.signals import post_save
from django.dispatch import receiver
from ozpcenter import constants
from .external_model import ExternalMod... | 29.185185 | 72 | 0.677665 | from django.core.cache import cache
from django.core.validators import RegexValidator
from django.db import models
from django.db.models.signals import post_delete
from django.db.models.signals import post_save
from django.dispatch import receiver
from ozpcenter import constants
from .external_model import ExternalMod... | 235 | 0 | 98 |
cad17cb72f8b94ede051dfc328eb14b0a91ca087 | 8,847 | py | Python | vectorizer.py | my-master/HashingTfidfVectorizer | 023626bfbebdc3d0118e98ae7c68bc1d252b5153 | [
"Apache-2.0"
] | null | null | null | vectorizer.py | my-master/HashingTfidfVectorizer | 023626bfbebdc3d0118e98ae7c68bc1d252b5153 | [
"Apache-2.0"
] | null | null | null | vectorizer.py | my-master/HashingTfidfVectorizer | 023626bfbebdc3d0118e98ae7c68bc1d252b5153 | [
"Apache-2.0"
] | 1 | 2020-07-14T02:05:46.000Z | 2020-07-14T02:05:46.000Z | from collections import Counter
from concurrent.futures import ProcessPoolExecutor
import concurrent
from typing import List, Any, Generator, Tuple, KeysView, ValuesView, Dict
import scipy as sp
from scipy import sparse
import numpy as np
from tokenizers.spacy_tokenizer import SpacyTokenizer
from logger import logger... | 35.963415 | 107 | 0.603707 | from collections import Counter
from concurrent.futures import ProcessPoolExecutor
import concurrent
from typing import List, Any, Generator, Tuple, KeysView, ValuesView, Dict
import scipy as sp
from scipy import sparse
import numpy as np
from tokenizers.spacy_tokenizer import SpacyTokenizer
from logger import logger... | 4,752 | 0 | 189 |
5be11d200ef0da8a6834ed6c935dc23c40a76f33 | 1,003 | py | Python | scripts/dateToTimestampe.py | Nicky5/Qnverter | 2d0a13ea306b11df24c465a5b572b6b367e0f9a6 | [
"MIT"
] | 1 | 2021-10-01T07:57:57.000Z | 2021-10-01T07:57:57.000Z | scripts/dateToTimestampe.py | Nicky5/Qnverter | 2d0a13ea306b11df24c465a5b572b6b367e0f9a6 | [
"MIT"
] | null | null | null | scripts/dateToTimestampe.py | Nicky5/Qnverter | 2d0a13ea306b11df24c465a5b572b6b367e0f9a6 | [
"MIT"
] | null | null | null | # data must be stored in JSON format
# data:
{
"name": "date to timestampe",
"author": "nicky",
"icon": "numbers.png",
"tags": "UNIX date timestamp",
"description": "converts a date to a UNIX timestamp",
"icon_link": "https://cdn-icons-png.flaticon.com/512/3402/3402135.png"
}
# data:
# any import s... | 28.657143 | 89 | 0.647059 | # data must be stored in JSON format
# data:
{
"name": "date to timestampe",
"author": "nicky",
"icon": "numbers.png",
"tags": "UNIX date timestamp",
"description": "converts a date to a UNIX timestamp",
"icon_link": "https://cdn-icons-png.flaticon.com/512/3402/3402135.png"
}
# data:
# any import s... | 547 | 0 | 22 |
f4424c2ffaf642057cce498d1366ad9881d35590 | 1,498 | py | Python | froide/problem/forms.py | manonthemat/froide | 698c49935eaf2e922f3c9f6a46af0fd545ccbbbb | [
"MIT"
] | null | null | null | froide/problem/forms.py | manonthemat/froide | 698c49935eaf2e922f3c9f6a46af0fd545ccbbbb | [
"MIT"
] | null | null | null | froide/problem/forms.py | manonthemat/froide | 698c49935eaf2e922f3c9f6a46af0fd545ccbbbb | [
"MIT"
] | null | null | null | from django import forms
from django.utils.translation import ugettext_lazy as _
from django.utils import timezone
from .models import ProblemReport, USER_PROBLEM_CHOICES
| 28.807692 | 70 | 0.542724 | from django import forms
from django.utils.translation import ugettext_lazy as _
from django.utils import timezone
from .models import ProblemReport, USER_PROBLEM_CHOICES
class ProblemReportForm(forms.Form):
kind = forms.ChoiceField(
choices=(
[('', '---')] + USER_PROBLEM_CHOICES
),
... | 728 | 574 | 23 |
323a2607223bde5ef5dca297bd7f2c43b9dbeacd | 1,260 | py | Python | pdfParanoia.py | megamillions/PDF-Paranoia | e484a8710b67eb92c8611adf56ba299beda46779 | [
"MIT"
] | null | null | null | pdfParanoia.py | megamillions/PDF-Paranoia | e484a8710b67eb92c8611adf56ba299beda46779 | [
"MIT"
] | null | null | null | pdfParanoia.py | megamillions/PDF-Paranoia | e484a8710b67eb92c8611adf56ba299beda46779 | [
"MIT"
] | null | null | null | #! python3
# pdfParanoia.py - Add password in command line
# to every PDF in folder and subfolders.
import PyPDF2, os, sys
password = sys.argv[1]
for foldername, subfolders, filenames in os.walk(os.getcwd()):
# Find each PDF after walking through given directory.
for filename in filenames:
if (filename.endswith... | 25.714286 | 62 | 0.704762 | #! python3
# pdfParanoia.py - Add password in command line
# to every PDF in folder and subfolders.
import PyPDF2, os, sys
password = sys.argv[1]
for foldername, subfolders, filenames in os.walk(os.getcwd()):
# Find each PDF after walking through given directory.
for filename in filenames:
if (filename.endswith... | 0 | 0 | 0 |
b30a0bc15747dc6cf9f83e1e4d0e309d3e35ceca | 1,339 | py | Python | src/utils.py | srisadhan/speech_emotions | 59888ce1bab173f9b3438d76e89a5240a547327e | [
"MIT"
] | 3 | 2020-05-08T02:51:35.000Z | 2021-08-19T16:28:04.000Z | src/utils.py | srisadhan/speech_emotions | 59888ce1bab173f9b3438d76e89a5240a547327e | [
"MIT"
] | 2 | 2021-03-19T12:01:43.000Z | 2022-01-13T02:30:07.000Z | src/utils.py | srisadhan/speech_emotions | 59888ce1bab173f9b3438d76e89a5240a547327e | [
"MIT"
] | 1 | 2022-02-05T00:30:50.000Z | 2022-02-05T00:30:50.000Z | from contextlib import contextmanager
import numpy as np
_my_colors = np.array([
[0, 127, 70],
[255, 0, 0],
[255, 217, 38],
[0, 135, 255],
[165, 0, 165],
[255, 167, 255],
[97, 142, 151],
[0, 255, 255],
[255, 96, 38],
[142, 76, 0],
[33, 0, 127],
[0, 0, 0],
... | 18.094595 | 57 | 0.475728 | from contextlib import contextmanager
import numpy as np
_my_colors = np.array([
[0, 127, 70],
[255, 0, 0],
[255, 217, 38],
[0, 135, 255],
[165, 0, 165],
[255, 167, 255],
[97, 142, 151],
[0, 255, 255],
[255, 96, 38],
[142, 76, 0],
[33, 0, 127],
[0, 0, 0],
... | 294 | 15 | 108 |
6d9bce09b55bddc59fd56838f61d038f2df71d10 | 702 | py | Python | meiduo_mall/apps/meiduo_admin/views/users.py | Vent-Any/meiduo_mall_cangku | 5b3b7f029be267cb5d2d3666f99be166d27213f1 | [
"MIT"
] | null | null | null | meiduo_mall/apps/meiduo_admin/views/users.py | Vent-Any/meiduo_mall_cangku | 5b3b7f029be267cb5d2d3666f99be166d27213f1 | [
"MIT"
] | null | null | null | meiduo_mall/apps/meiduo_admin/views/users.py | Vent-Any/meiduo_mall_cangku | 5b3b7f029be267cb5d2d3666f99be166d27213f1 | [
"MIT"
] | null | null | null | from rest_framework.generics import ListAPIView
from rest_framework.generics import ListCreateAPIView
from apps.meiduo_admin.serializer.users import UserModelSerializer
from apps.users.models import User
from apps.meiduo_admin.utils import PageNumber
| 33.428571 | 66 | 0.75641 | from rest_framework.generics import ListAPIView
from rest_framework.generics import ListCreateAPIView
from apps.meiduo_admin.serializer.users import UserModelSerializer
from apps.users.models import User
from apps.meiduo_admin.utils import PageNumber
class UserListAPIView(ListCreateAPIView):
# queryset = User.ob... | 200 | 226 | 23 |
9a9af4eb3e66d1c20306186cc8851519603fb6e3 | 73 | py | Python | Exercise70.py | JBCFurtado/Rabiscos_Em_Python | a1a5be9391e1bbbb301b8a7776043f7ea77e24da | [
"MIT"
] | null | null | null | Exercise70.py | JBCFurtado/Rabiscos_Em_Python | a1a5be9391e1bbbb301b8a7776043f7ea77e24da | [
"MIT"
] | null | null | null | Exercise70.py | JBCFurtado/Rabiscos_Em_Python | a1a5be9391e1bbbb301b8a7776043f7ea77e24da | [
"MIT"
] | null | null | null | #Função par
print(par(4))
print(par(23))
| 12.166667 | 19 | 0.60274 | #Função par
def par(x):
return (x%2==0)
print(par(4))
print(par(23))
| 10 | 0 | 22 |
3b2866775530630c0d313eee7d895e64864b1fe2 | 8,779 | py | Python | tests/test_axl.py | levensailor/ciscoaxl | f3a78ef39fba011c8bb0fdc6184a53d879e2d049 | [
"MIT"
] | 16 | 2019-04-18T17:16:48.000Z | 2020-05-27T13:39:41.000Z | tests/test_axl.py | levensailor/ciscoaxl | f3a78ef39fba011c8bb0fdc6184a53d879e2d049 | [
"MIT"
] | 2 | 2020-03-16T14:26:46.000Z | 2020-05-28T09:23:11.000Z | tests/test_axl.py | levensailor/ciscoaxl | f3a78ef39fba011c8bb0fdc6184a53d879e2d049 | [
"MIT"
] | 10 | 2019-09-29T16:21:11.000Z | 2020-05-22T20:07:33.000Z | from ciscoaxl import axl
from decouple import config
cucm = config("CUCM_PUBLISHER")
username = config("CUCM_AXL_USERNAME")
password = config("CUCM_AXL_PASSWORD")
version = config("CUCM_VERSION")
ucm = axl(username=username, password=password, cucm=cucm, cucm_version=version)
# TODO: add below methods for testing
... | 29.759322 | 110 | 0.571363 | from ciscoaxl import axl
from decouple import config
cucm = config("CUCM_PUBLISHER")
username = config("CUCM_AXL_USERNAME")
password = config("CUCM_AXL_PASSWORD")
version = config("CUCM_VERSION")
ucm = axl(username=username, password=password, cucm=cucm, cucm_version=version)
class TestPhoneMethods:
def test_ad... | 2,192 | 2 | 130 |
f4ac601a7ba8f54acfb127059163b49c7032ec76 | 3,032 | py | Python | server/service/dblist.py | wothard/lazyshot | 664bd6324bcb8931a14b1e76396a137f6d49cbe1 | [
"MIT"
] | null | null | null | server/service/dblist.py | wothard/lazyshot | 664bd6324bcb8931a14b1e76396a137f6d49cbe1 | [
"MIT"
] | 1 | 2022-02-27T08:21:01.000Z | 2022-02-27T08:21:01.000Z | server/service/dblist.py | wothard/lazyshot | 664bd6324bcb8931a14b1e76396a137f6d49cbe1 | [
"MIT"
] | null | null | null | import psycopg2
import logging
import pymysql
# mysql
# connect
| 35.255814 | 100 | 0.525396 | import psycopg2
import logging
import pymysql
class DBList():
def get_table_struct(self):
def tuple_first(in_tuple):
return in_tuple[0]
conn = psycopg2.connect(
database="lazyshot", user="root", password="root", host="127.0.0.1", port="5432")
cursor = conn.cursor()
... | 2,862 | -6 | 101 |
976f0328ddc8dfa31cda29b390b282d8d72a585c | 8,834 | py | Python | plugins/modules/launchdarkly_environment.py | jhutchings1/ansible-launchdarkly-collection | 2c21f589b0a889ddf4e0ad0a04f6b8c586585abd | [
"Apache-2.0"
] | null | null | null | plugins/modules/launchdarkly_environment.py | jhutchings1/ansible-launchdarkly-collection | 2c21f589b0a889ddf4e0ad0a04f6b8c586585abd | [
"Apache-2.0"
] | null | null | null | plugins/modules/launchdarkly_environment.py | jhutchings1/ansible-launchdarkly-collection | 2c21f589b0a889ddf4e0ad0a04f6b8c586585abd | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {
"metadata_version": "0.1.0",
"status": ["preview"],
"supported_by": "community",
}
DOCUMENTATION = r"""
---
module: launchdarkly_environment
short_description: Create Launchdarkly... | 31.105634 | 147 | 0.644782 | #!/usr/bin/python
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {
"metadata_version": "0.1.0",
"status": ["preview"],
"supported_by": "community",
}
DOCUMENTATION = r"""
---
module: launchdarkly_environment
short_description: Create Launchdarkly... | 5,243 | 0 | 115 |
2c4ed8cd0460549ef49945e7afcd26e1a45cfa91 | 6,095 | py | Python | lib/servers/script_scanner/experiment.py | clayton-ho/EGGs_Control | 312f02488b47cf880c6e6600ce10856a871123df | [
"MIT"
] | 2 | 2021-12-26T05:00:54.000Z | 2021-12-30T17:15:49.000Z | lib/servers/script_scanner/experiment.py | clayton-ho/EGGs_Control | 312f02488b47cf880c6e6600ce10856a871123df | [
"MIT"
] | null | null | null | lib/servers/script_scanner/experiment.py | clayton-ho/EGGs_Control | 312f02488b47cf880c6e6600ce10856a871123df | [
"MIT"
] | null | null | null | """
Superclass of experiments and related classes.
"""
import labrad
import traceback
from treedict import TreeDict
class experiment_info(object):
'''
Holds informaton about the experiment
Attributes
----------
name: str
parameters: TreeDict
required_parameters: list
'''
required_p... | 32.248677 | 90 | 0.604922 | """
Superclass of experiments and related classes.
"""
import labrad
import traceback
from treedict import TreeDict
class experiment_info(object):
'''
Holds informaton about the experiment
Attributes
----------
name: str
parameters: TreeDict
required_parameters: list
'''
required_p... | 2,608 | 0 | 322 |
b21ccfa304e3d6a31f7dea0f62473f3a1cbd308a | 176 | py | Python | protonfixes/gamefixes/221040.py | Citiroller/protonfixes | 6e0116bd1cd2172b6f0ff9905667bbc59595cdb7 | [
"BSD-2-Clause"
] | 213 | 2018-10-06T01:40:26.000Z | 2022-03-16T16:17:37.000Z | protonfixes/gamefixes/221040.py | Citiroller/protonfixes | 6e0116bd1cd2172b6f0ff9905667bbc59595cdb7 | [
"BSD-2-Clause"
] | 88 | 2018-10-06T17:38:56.000Z | 2022-02-19T13:27:26.000Z | protonfixes/gamefixes/221040.py | Citiroller/protonfixes | 6e0116bd1cd2172b6f0ff9905667bbc59595cdb7 | [
"BSD-2-Clause"
] | 67 | 2018-10-09T16:57:16.000Z | 2022-03-14T13:06:25.000Z | """ Game fix for Resident Evil 6 / Biohazard 6
"""
#pylint: disable=C0103
from protonfixes import util
def main():
""" Uses wmp11
"""
util.protontricks('wmp11')
| 14.666667 | 46 | 0.642045 | """ Game fix for Resident Evil 6 / Biohazard 6
"""
#pylint: disable=C0103
from protonfixes import util
def main():
""" Uses wmp11
"""
util.protontricks('wmp11')
| 0 | 0 | 0 |
4925d10f0d7ad8f43fe3da4a07dbc3d1690dff55 | 8,438 | py | Python | FN/policy_gradient_continuous_agent.py | inamasa12/baby-steps-of-rl-ja | b596d9192f66b569ea7148d67537526eb2719581 | [
"Apache-2.0"
] | null | null | null | FN/policy_gradient_continuous_agent.py | inamasa12/baby-steps-of-rl-ja | b596d9192f66b569ea7148d67537526eb2719581 | [
"Apache-2.0"
] | 7 | 2019-12-16T22:06:34.000Z | 2022-02-10T00:20:07.000Z | FN/policy_gradient_continuous_agent.py | inamasa12/baby-steps-of-rl-ja | b596d9192f66b569ea7148d67537526eb2719581 | [
"Apache-2.0"
] | null | null | null | import os
import argparse
import random
import numpy as np
from sklearn.preprocessing import StandardScaler
from sklearn.externals import joblib
import tensorflow as tf
from tensorflow.python import keras as K
import gym
from fn_framework import FNAgent, Trainer, Observer
if __name__ == "__main__":
parser = ... | 37.336283 | 83 | 0.614956 | import os
import argparse
import random
import numpy as np
from sklearn.preprocessing import StandardScaler
from sklearn.externals import joblib
import tensorflow as tf
from tensorflow.python import keras as K
import gym
from fn_framework import FNAgent, Trainer, Observer
class PolicyGradientContinuousAgent(FNAgent):... | 7,148 | 308 | 439 |
4b500be8850a729d3d5a43f903492268f7cf40be | 2,878 | py | Python | Mar_9.py | keiraaaaa/Leetcode | 90bf174f5613c79119aec58a1f0d1d2c1c3496bb | [
"MIT"
] | null | null | null | Mar_9.py | keiraaaaa/Leetcode | 90bf174f5613c79119aec58a1f0d1d2c1c3496bb | [
"MIT"
] | null | null | null | Mar_9.py | keiraaaaa/Leetcode | 90bf174f5613c79119aec58a1f0d1d2c1c3496bb | [
"MIT"
] | null | null | null | ############################
# 226. Invert Binary Tree
############################
'''
# Definition for a binary tree node.
class TreeNode:
def __init__(self, x):
self.val = x
self.left = None
self.right = None
class Solution:
def invertTree(self, root):
"""
:type root:... | 21.477612 | 88 | 0.51911 | ############################
# 226. Invert Binary Tree
############################
'''
# Definition for a binary tree node.
class TreeNode:
def __init__(self, x):
self.val = x
self.left = None
self.right = None
class Solution:
def invertTree(self, root):
"""
:type root:... | 47 | 421 | 71 |
a74aba2b10db05b601e243b9d582ca00574868ab | 317 | py | Python | src/run_training.py | adsi7698/Optical-Character-Recognition | 636d059d27c536517dd40f183665ba6ecb1fc618 | [
"Unlicense"
] | null | null | null | src/run_training.py | adsi7698/Optical-Character-Recognition | 636d059d27c536517dd40f183665ba6ecb1fc618 | [
"Unlicense"
] | null | null | null | src/run_training.py | adsi7698/Optical-Character-Recognition | 636d059d27c536517dd40f183665ba6ecb1fc618 | [
"Unlicense"
] | null | null | null | import mnist_loader
import network
def run_train():
""" The network is trained by executing Network module """
training_data, validation_data, test_data = mnist_loader.load_data_wrapper()
net = network.Network([784, 30, 10])
net.SGD(training_data, 30, 10, 3.0, test_data=test_data)
network.save_object(net)
| 26.416667 | 77 | 0.757098 | import mnist_loader
import network
def run_train():
""" The network is trained by executing Network module """
training_data, validation_data, test_data = mnist_loader.load_data_wrapper()
net = network.Network([784, 30, 10])
net.SGD(training_data, 30, 10, 3.0, test_data=test_data)
network.save_object(net)
| 0 | 0 | 0 |
628cb2ac0ce18b461212b99d623d4ef9a0b7ae3b | 2,190 | py | Python | benchmark/rclpy/publisher-stress-test.py | vincentrou/rclnodejs | afc4c355c3eeb8dc22bd796586fceef40b12c282 | [
"Apache-2.0"
] | null | null | null | benchmark/rclpy/publisher-stress-test.py | vincentrou/rclnodejs | afc4c355c3eeb8dc22bd796586fceef40b12c282 | [
"Apache-2.0"
] | null | null | null | benchmark/rclpy/publisher-stress-test.py | vincentrou/rclnodejs | afc4c355c3eeb8dc22bd796586fceef40b12c282 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2017 Intel 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
#
# Unle... | 28.815789 | 105 | 0.715525 | #!/usr/bin/env python3
# Copyright (c) 2017 Intel 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
#
# Unle... | 1,375 | 0 | 23 |
63e88a62ce02074868f6424e1815bdf184db65ef | 4,416 | py | Python | Real-Time-Age-Calculation/main.py | swapnilgarg7/Face-X | fab21bf667fa7387b8e73e5a1d72fcba4fba2818 | [
"MIT"
] | 5 | 2022-03-24T14:05:30.000Z | 2022-03-28T17:26:49.000Z | Real-Time-Age-Calculation/main.py | swapnilgarg7/Face-X | fab21bf667fa7387b8e73e5a1d72fcba4fba2818 | [
"MIT"
] | null | null | null | Real-Time-Age-Calculation/main.py | swapnilgarg7/Face-X | fab21bf667fa7387b8e73e5a1d72fcba4fba2818 | [
"MIT"
] | null | null | null | import cv2
import math
import argparse
def highlightFace(net, frame, conf_threshold=0.7):
'''
This function detects faces on the image using the 'net' passed (if any) and returns the detection output
as well as the cordinates of the faces detected
'''
frameOpencvDnn=frame.copy()
#--------savi... | 40.145455 | 155 | 0.64606 | import cv2
import math
import argparse
def highlightFace(net, frame, conf_threshold=0.7):
'''
This function detects faces on the image using the 'net' passed (if any) and returns the detection output
as well as the cordinates of the faces detected
'''
frameOpencvDnn=frame.copy()
#--------savi... | 0 | 0 | 0 |
6fa9d4e801c303d15793ecf82029a5777f04f770 | 2,524 | py | Python | pdfExtract/pdf_to_txt_pdfminer.py | bqsgwys/KARMA | 4ddb42c06adaf9a6e9936d7f184f632f8ab43095 | [
"MIT"
] | 1 | 2019-08-29T01:01:07.000Z | 2019-08-29T01:01:07.000Z | pdfExtract/pdf_to_txt_pdfminer.py | bqsgwys/KARMA | 4ddb42c06adaf9a6e9936d7f184f632f8ab43095 | [
"MIT"
] | null | null | null | pdfExtract/pdf_to_txt_pdfminer.py | bqsgwys/KARMA | 4ddb42c06adaf9a6e9936d7f184f632f8ab43095 | [
"MIT"
] | 1 | 2019-08-24T01:46:48.000Z | 2019-08-24T01:46:48.000Z | import sys
import importlib
importlib.reload(sys)
from os import chdir, getcwd, listdir, path
from time import strftime
from pdfminer.pdfparser import PDFParser, PDFDocument
from pdfminer.pdfinterp import PDFResourceManager, PDFPageInterpreter
from pdfminer.converter import PDFPageAggregator
from pdfminer.layout import... | 27.139785 | 80 | 0.670365 | import sys
import importlib
importlib.reload(sys)
from os import chdir, getcwd, listdir, path
from time import strftime
from pdfminer.pdfparser import PDFParser, PDFDocument
from pdfminer.pdfinterp import PDFResourceManager, PDFPageInterpreter
from pdfminer.converter import PDFPageAggregator
from pdfminer.layout import... | 1,725 | 0 | 48 |
430c4d44d80a53df56f3ebfd8461e9c29bdef797 | 4,305 | py | Python | backend/swagger_server/tasks/invoke_webhook_.py | Lend88/libresign | 9537f39a696fa5f3433052406329d77d528b6cf9 | [
"MIT"
] | 6 | 2019-01-29T05:58:37.000Z | 2021-11-02T22:47:02.000Z | backend/swagger_server/tasks/invoke_webhook_.py | Lend88/libresign | 9537f39a696fa5f3433052406329d77d528b6cf9 | [
"MIT"
] | 9 | 2020-09-09T04:53:01.000Z | 2022-03-08T22:52:18.000Z | backend/swagger_server/tasks/invoke_webhook_.py | Lend88/libresign | 9537f39a696fa5f3433052406329d77d528b6cf9 | [
"MIT"
] | 4 | 2019-01-29T07:38:55.000Z | 2021-10-16T21:06:42.000Z |
from uuid import UUID
import json
import logging
import traceback
import requests
from requests.exceptions import ConnectionError as RequestsConnectionError, MissingSchema
from sqlalchemy.orm.exc import NoResultFound
from .. import app
from ..db import Session
from ..mappings import *
from ..helpers import type_che... | 29.895833 | 89 | 0.568873 |
from uuid import UUID
import json
import logging
import traceback
import requests
from requests.exceptions import ConnectionError as RequestsConnectionError, MissingSchema
from sqlalchemy.orm.exc import NoResultFound
from .. import app
from ..db import Session
from ..mappings import *
from ..helpers import type_che... | 1,333 | 0 | 23 |
89eff22d9d65a7bdcd163ee8887abcd24c0b0821 | 7,723 | py | Python | test.py | babbu3682/MRI-Net | e3b6aeb44991bf45a4884a46af48a99ac656ac52 | [
"MIT"
] | 3 | 2021-10-04T11:00:23.000Z | 2021-12-13T12:31:28.000Z | test.py | babbu3682/MRI-Net | e3b6aeb44991bf45a4884a46af48a99ac656ac52 | [
"MIT"
] | null | null | null | test.py | babbu3682/MRI-Net | e3b6aeb44991bf45a4884a46af48a99ac656ac52 | [
"MIT"
] | null | null | null | import os
from pathlib import Path
import argparse
import datetime
import numpy as np
import time
import torch
import json
import random
# import functools
import utils
from create_model import create_model
from create_datasets.prepare_datasets import build_test_dataset
from engine import *
from losses import Uptask_L... | 39.005051 | 193 | 0.67681 | import os
from pathlib import Path
import argparse
import datetime
import numpy as np
import time
import torch
import json
import random
# import functools
import utils
from create_model import create_model
from create_datasets.prepare_datasets import build_test_dataset
from engine import *
from losses import Uptask_L... | 6,571 | 0 | 69 |
fdf2895b3acba7c7aef12b2caaa000104168c153 | 195 | py | Python | util/util.py | tpimentelms/phonotactic-complexity | 70d0a9e45943096d7640eaf7277033e3920408c9 | [
"MIT"
] | 5 | 2020-04-17T20:46:11.000Z | 2022-03-02T10:32:00.000Z | util/util.py | tpimentelms/phonotactic-complexity | 70d0a9e45943096d7640eaf7277033e3920408c9 | [
"MIT"
] | null | null | null | util/util.py | tpimentelms/phonotactic-complexity | 70d0a9e45943096d7640eaf7277033e3920408c9 | [
"MIT"
] | null | null | null | import numpy as np
import torch
import pathlib
| 15 | 59 | 0.723077 | import numpy as np
import torch
import pathlib
def config(seed):
np.random.seed(7)
torch.manual_seed(7)
def mkdir(folder):
pathlib.Path(folder).mkdir(parents=True, exist_ok=True)
| 100 | 0 | 46 |
9844f3d7b5b70879b5137b6245bf9d56fa63e87e | 1,811 | py | Python | jupyros/server_extension.py | ihuicatl/jupyter-ros | ea9c9e89f0ebf82108ac4d96897b2c64e6f74563 | [
"BSD-3-Clause"
] | 459 | 2019-02-18T16:02:24.000Z | 2022-03-24T18:59:43.000Z | jupyros/server_extension.py | ihuicatl/jupyter-ros | ea9c9e89f0ebf82108ac4d96897b2c64e6f74563 | [
"BSD-3-Clause"
] | 54 | 2019-03-18T09:01:04.000Z | 2021-11-29T17:45:00.000Z | jupyros/server_extension.py | ihuicatl/jupyter-ros | ea9c9e89f0ebf82108ac4d96897b2c64e6f74563 | [
"BSD-3-Clause"
] | 83 | 2019-04-08T05:53:28.000Z | 2022-03-21T02:57:02.000Z | #############################################################################
# Copyright (c) Wolf Vollprecht, QuantStack #
# #
# Distributed under the terms of the BSD 3-Clause License. #
# ... | 35.509804 | 90 | 0.530094 | #############################################################################
# Copyright (c) Wolf Vollprecht, QuantStack #
# #
# Distributed under the terms of the BSD 3-Clause License. #
# ... | 451 | 18 | 49 |
c7a61dfa0a1be1977041db26628e26e833d1e765 | 11,379 | py | Python | yt_dlp/extractor/mildom.py | olipfei/yt-dlp | 7879e79d11a2e5855167820518df49caf623fe48 | [
"Unlicense"
] | 11 | 2022-01-06T22:09:50.000Z | 2022-03-12T22:26:22.000Z | yt_dlp/extractor/mildom.py | olipfei/yt-dlp | 7879e79d11a2e5855167820518df49caf623fe48 | [
"Unlicense"
] | 4 | 2022-02-25T08:20:18.000Z | 2022-03-17T16:16:20.000Z | yt_dlp/extractor/mildom.py | olipfei/yt-dlp | 7879e79d11a2e5855167820518df49caf623fe48 | [
"Unlicense"
] | 3 | 2022-02-19T08:59:13.000Z | 2022-03-06T16:11:21.000Z | import functools
import json
import uuid
from .common import InfoExtractor
from ..utils import (
determine_ext,
dict_get,
ExtractorError,
float_or_none,
OnDemandPagedList,
traverse_obj,
)
| 38.442568 | 154 | 0.5533 | import functools
import json
import uuid
from .common import InfoExtractor
from ..utils import (
determine_ext,
dict_get,
ExtractorError,
float_or_none,
OnDemandPagedList,
traverse_obj,
)
class MildomBaseIE(InfoExtractor):
_GUEST_ID = None
def _call_api(self, url, video_id, query=Non... | 6,861 | 4,431 | 115 |
5c3582a85174999dc4797d1a0ff273dd42485222 | 12,360 | py | Python | tests/test_solvers/test_quasisep/test_core.py | 0x0L/tinygp | 918c0bb8f7a0adbe9ca06df4667a3c15b9f92cec | [
"MIT"
] | null | null | null | tests/test_solvers/test_quasisep/test_core.py | 0x0L/tinygp | 918c0bb8f7a0adbe9ca06df4667a3c15b9f92cec | [
"MIT"
] | null | null | null | tests/test_solvers/test_quasisep/test_core.py | 0x0L/tinygp | 918c0bb8f7a0adbe9ca06df4667a3c15b9f92cec | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# mypy: ignore-errors
from itertools import combinations
import jax.numpy as jnp
import numpy as np
import pytest
from tinygp.solvers.quasisep.core import (
DiagQSM,
LowerTriQSM,
SquareQSM,
StrictLowerTriQSM,
StrictUpperTriQSM,
SymmQSM,
)
@pytest.fixture(params=["ran... | 30.9 | 82 | 0.582524 | # -*- coding: utf-8 -*-
# mypy: ignore-errors
from itertools import combinations
import jax.numpy as jnp
import numpy as np
import pytest
from tinygp.solvers.quasisep.core import (
DiagQSM,
LowerTriQSM,
SquareQSM,
StrictLowerTriQSM,
StrictUpperTriQSM,
SymmQSM,
)
@pytest.fixture(params=["ran... | 11,370 | 0 | 360 |
2f2b4ab7abb6f6019210c464c87de68fa6200c4b | 515 | py | Python | tests/test_utils_data.py | ChasNelson1990/pyzoopla | d22ceb7f443016e0ce92436741fa3b27de3c53b3 | [
"MIT"
] | 1 | 2020-08-29T01:41:23.000Z | 2020-08-29T01:41:23.000Z | tests/test_utils_data.py | ChasNelson1990/pyzoopla | d22ceb7f443016e0ce92436741fa3b27de3c53b3 | [
"MIT"
] | 4 | 2019-10-24T14:48:50.000Z | 2021-06-17T13:57:27.000Z | tests/test_utils_data.py | ChasNelson1990/pyzoopla | d22ceb7f443016e0ce92436741fa3b27de3c53b3 | [
"MIT"
] | 2 | 2018-07-11T12:13:44.000Z | 2022-03-24T11:14:26.000Z | html1 = """<li class="clearfix">
<span class="interface nearby_stations_schools_national_rail_station" title="London Bridge"></span>
<span class="nearby_stations_schools_name" title="London Bridge">London Bridge</span>
(0.4 miles)
</li>"""
html2 = """<li class="clearfix">
<span class="interface... | 27.105263 | 99 | 0.691262 | html1 = """<li class="clearfix">
<span class="interface nearby_stations_schools_national_rail_station" title="London Bridge"></span>
<span class="nearby_stations_schools_name" title="London Bridge">London Bridge</span>
(0.4 miles)
</li>"""
html2 = """<li class="clearfix">
<span class="interface... | 0 | 0 | 0 |
5e50eed7b3d0b70953b710020a5579e69debd092 | 679 | py | Python | NewYearChaos.py | vantonini/HackerRankCodes | 657b782b0a678a8edd84194b1bd147a305c6f01c | [
"MIT"
] | null | null | null | NewYearChaos.py | vantonini/HackerRankCodes | 657b782b0a678a8edd84194b1bd147a305c6f01c | [
"MIT"
] | null | null | null | NewYearChaos.py | vantonini/HackerRankCodes | 657b782b0a678a8edd84194b1bd147a305c6f01c | [
"MIT"
] | null | null | null |
# input = "5 1 2 3 7 8 6 4"
input = "1 2 5 3 7 8 6 4"
# input = "2 1 5 3 4"
# input = "2 5 1 3 4"
a = list(map(int, input.rstrip().split()))
minimumBribes(a) | 29.521739 | 120 | 0.572901 | def minimumBribes(q):
total_bribes = 0
for idx, num in enumerate(q):
if (num - (idx + 1) > 2):
print("Too chaotic")
return
# if there is a greater value between 2 positions before the original one (num-2) and its actual position (idx),
# it means that this number ... | 490 | 0 | 22 |
c5432aeb55cae2d4c190cdba30eb8b39542d26c3 | 4,615 | py | Python | model.py | ZhiangChen/brown_dwarf_ML | 49468d26e22cd074a074f6b610fbef46ed8f7637 | [
"Apache-2.0"
] | null | null | null | model.py | ZhiangChen/brown_dwarf_ML | 49468d26e22cd074a074f6b610fbef46ed8f7637 | [
"Apache-2.0"
] | null | null | null | model.py | ZhiangChen/brown_dwarf_ML | 49468d26e22cd074a074f6b610fbef46ed8f7637 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
"""
model.py
Zhiang Chen
Nov 24, 2019
"""
from __future__ import absolute_import, division, print_function, unicode_literals
import tensorflow as tf
import pandas as pd
import matplotlib.pyplot as plt
import os
if __name__ == "__main__":
inputs = 200
layers = [200, 20, 2]
nn = FCL(... | 32.5 | 128 | 0.593499 | #!/usr/bin/env python
"""
model.py
Zhiang Chen
Nov 24, 2019
"""
from __future__ import absolute_import, division, print_function, unicode_literals
import tensorflow as tf
import pandas as pd
import matplotlib.pyplot as plt
import os
class FCL(object):
def __init__(self, input_shape, layers, activation_function='r... | 2,005 | 2,152 | 122 |
e2a250769110d19e18e743613def45ae92f2aeb4 | 5,134 | py | Python | src/lassl/blender.py | dumpmemory/lassl | dfe56f09cc2ade6c777ad8561b24f23d83a34188 | [
"Apache-2.0"
] | null | null | null | src/lassl/blender.py | dumpmemory/lassl | dfe56f09cc2ade6c777ad8561b24f23d83a34188 | [
"Apache-2.0"
] | null | null | null | src/lassl/blender.py | dumpmemory/lassl | dfe56f09cc2ade6c777ad8561b24f23d83a34188 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# Copyright 2021 TUNiB Inc.
# Copyright (c) 2020, 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/licens... | 34.226667 | 110 | 0.643748 | # coding=utf-8
# Copyright 2021 TUNiB Inc.
# Copyright (c) 2020, 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/licens... | 1,473 | 0 | 81 |
3ddc9aa934c07e3842beaf05873ed103271e482e | 462 | py | Python | classes/utils/utils.py | dimartinot/neural_networks_with_pso | 98ea9ac1ab40f74087c5556bcabb0fd9a1d92d7b | [
"MIT"
] | null | null | null | classes/utils/utils.py | dimartinot/neural_networks_with_pso | 98ea9ac1ab40f74087c5556bcabb0fd9a1d92d7b | [
"MIT"
] | null | null | null | classes/utils/utils.py | dimartinot/neural_networks_with_pso | 98ea9ac1ab40f74087c5556bcabb0fd9a1d92d7b | [
"MIT"
] | null | null | null | import numpy as np | 28.875 | 80 | 0.694805 | import numpy as np
def unknownDerivative():
raise ValueError("?")
def l1_error(y_true,y_pred):
return np.array(np.abs(y_true - y_pred))
def l2_error(y_true,y_pred):
return (np.square(y_true - y_pred)).mean(axis=0)
def createMatrix(output_size, input_size):
w=np.random.normal(0,1,(output_size,input_s... | 352 | 0 | 92 |
0d875ddc29fb526b3ba4ac522bc952d5e24e6de0 | 349 | py | Python | prodResClass.py | BatyaGG/Task-Parameterized-Gaussian-Mixture-Model | a968df241471f88405123cd21ba87fb1ea9bdc6b | [
"MIT"
] | 13 | 2018-03-22T03:56:36.000Z | 2022-03-22T10:04:13.000Z | prodResClass.py | WPI-ME5205/TPGMM | a968df241471f88405123cd21ba87fb1ea9bdc6b | [
"MIT"
] | 1 | 2020-12-22T08:44:49.000Z | 2020-12-22T08:44:49.000Z | prodResClass.py | WPI-ME5205/TPGMM | a968df241471f88405123cd21ba87fb1ea9bdc6b | [
"MIT"
] | 5 | 2018-05-02T03:08:42.000Z | 2021-04-05T01:35:18.000Z | import numpy as np | 38.777778 | 51 | 0.593123 | import numpy as np
class prodRes:
def __init__(self, b):
self.invSigma = np.ndarray(shape=(b,b, 0))
self.Sigma = np.ndarray(shape=(b, b, 0))
self.detSigma = np.ndarray(shape=(0))
self.Mu = np.ndarray(shape=(b, 0))
self.invSigmaIn = np.ndarray(shape=(1,1,0))
self.detSi... | 290 | -7 | 48 |
6ac8f9deb19603ee381eb0ad85c0d881b1d0355a | 7,168 | py | Python | Simpler scripts/analysis.py | peter-santana/SkyBoT_Search | 7f3cdff3876362041c42ed68e2ad29c17b04ecfe | [
"MIT"
] | null | null | null | Simpler scripts/analysis.py | peter-santana/SkyBoT_Search | 7f3cdff3876362041c42ed68e2ad29c17b04ecfe | [
"MIT"
] | null | null | null | Simpler scripts/analysis.py | peter-santana/SkyBoT_Search | 7f3cdff3876362041c42ed68e2ad29c17b04ecfe | [
"MIT"
] | null | null | null | #MBA and Asteroid Analysis
#Comments are done so for magnitudes less than 18 (LCAM Project standards)
import numpy as np
import sys
file = open("Analysis.txt", "w")
Asteroids = np.genfromtxt("Objects_test_asteroids.txt" , comments='#', delimiter = " | ",dtype=None,invalid_raise=False,usecols=(1), encoding=None)
... | 47.157895 | 148 | 0.730887 | #MBA and Asteroid Analysis
#Comments are done so for magnitudes less than 18 (LCAM Project standards)
import numpy as np
import sys
file = open("Analysis.txt", "w")
Asteroids = np.genfromtxt("Objects_test_asteroids.txt" , comments='#', delimiter = " | ",dtype=None,invalid_raise=False,usecols=(1), encoding=None)
... | 0 | 0 | 0 |
d6e16ba6d7b14d8de9db9ef7eb624534ece34bdb | 798 | py | Python | tcmi/__init__.py | BenjaminRegler/tcmi | 7f79e0fc02e45db41da723b24234b5e7f71e9464 | [
"Apache-2.0"
] | null | null | null | tcmi/__init__.py | BenjaminRegler/tcmi | 7f79e0fc02e45db41da723b24234b5e7f71e9464 | [
"Apache-2.0"
] | null | null | null | tcmi/__init__.py | BenjaminRegler/tcmi | 7f79e0fc02e45db41da723b24234b5e7f71e9464 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
@package tcmi
@copyright Copyright (c) 2018+ Fritz Haber Institute of the Max Planck Society,
Benjamin Regler <regler@fhi-berlin.mpg.de>
@license See LICENSE file for details.
Licensed under the Apache License, Version 2.0 (the 'License').
You may not use this file excep... | 36.272727 | 112 | 0.740602 | # -*- coding: utf-8 -*-
"""
@package tcmi
@copyright Copyright (c) 2018+ Fritz Haber Institute of the Max Planck Society,
Benjamin Regler <regler@fhi-berlin.mpg.de>
@license See LICENSE file for details.
Licensed under the Apache License, Version 2.0 (the 'License').
You may not use this file excep... | 0 | 0 | 0 |
f8f7c4c218545ffe2e2ff8b644c7180f6413d7fd | 826 | py | Python | ibis/pyspark/api.py | hjoo/ibis | 72ece317337fb7d329337f20db930845a669ce85 | [
"Apache-2.0"
] | null | null | null | ibis/pyspark/api.py | hjoo/ibis | 72ece317337fb7d329337f20db930845a669ce85 | [
"Apache-2.0"
] | null | null | null | ibis/pyspark/api.py | hjoo/ibis | 72ece317337fb7d329337f20db930845a669ce85 | [
"Apache-2.0"
] | null | null | null | from ibis.pyspark.client import PySparkClient
from ibis.pyspark.compiler import dialect # noqa: F401
def connect(session):
"""
Create a `SparkClient` for use with Ibis. Pipes **kwargs into SparkClient,
which pipes them into SparkContext. See documentation for SparkContext:
https://spark.apache.org/do... | 41.3 | 112 | 0.749395 | from ibis.pyspark.client import PySparkClient
from ibis.pyspark.compiler import dialect # noqa: F401
def connect(session):
"""
Create a `SparkClient` for use with Ibis. Pipes **kwargs into SparkClient,
which pipes them into SparkContext. See documentation for SparkContext:
https://spark.apache.org/do... | 0 | 0 | 0 |
c007e80ddc590ed427db3211f4a5b62c64e9f8ca | 69,317 | py | Python | src/onelogin/api/client.py | chrono/onelogin-python-sdk | 5f5ec6eb45058f85a3f9b7813e182265bb814db0 | [
"MIT"
] | null | null | null | src/onelogin/api/client.py | chrono/onelogin-python-sdk | 5f5ec6eb45058f85a3f9b7813e182265bb814db0 | [
"MIT"
] | null | null | null | src/onelogin/api/client.py | chrono/onelogin-python-sdk | 5f5ec6eb45058f85a3f9b7813e182265bb814db0 | [
"MIT"
] | null | null | null | #!/usr/bin/python
""" OneLoginClient class
Copyright (c) 2017, OneLogin, Inc.
All rights reserved.
OneLoginClient class of the OneLogin's Python SDK.
"""
import datetime
from dateutil import tz
import requests
from defusedxml.lxml import fromstring
from onelogin.api.util.urlbuilder import UrlBuilder
from onelogin... | 35.186294 | 167 | 0.59401 | #!/usr/bin/python
""" OneLoginClient class
Copyright (c) 2017, OneLogin, Inc.
All rights reserved.
OneLoginClient class of the OneLogin's Python SDK.
"""
import datetime
from dateutil import tz
import requests
from defusedxml.lxml import fromstring
from onelogin.api.util.urlbuilder import UrlBuilder
from onelogin... | 4,697 | 0 | 351 |
045a0ba41bc8a0e9f7cdbe6646845212cfa944e3 | 475 | py | Python | BOJ/divide_and_conquer_boj/z.py | mrbartrns/swacademy_structure | 778f0546030385237c383d81ec37d5bd9ed1272d | [
"MIT"
] | null | null | null | BOJ/divide_and_conquer_boj/z.py | mrbartrns/swacademy_structure | 778f0546030385237c383d81ec37d5bd9ed1272d | [
"MIT"
] | null | null | null | BOJ/divide_and_conquer_boj/z.py | mrbartrns/swacademy_structure | 778f0546030385237c383d81ec37d5bd9ed1272d | [
"MIT"
] | null | null | null | # BOJ 1074
import sys
si = sys.stdin.readline
n, r, c = map(int, si().split())
print(divide(r, c, n))
| 21.590909 | 62 | 0.498947 | # BOJ 1074
import sys
si = sys.stdin.readline
def divide(x, y, k):
if k == 0:
return 0
half = 1 << (k - 1)
if x < half and y < half:
return divide(x, y, half)
elif x < half <= y:
return half * half + divide(x, y - half, k - 1)
elif x >= half > y:
return 2 * half * ... | 346 | 0 | 23 |
e3b9f04529c8e6e56ace4d3c6daa35b61dfc6444 | 564 | py | Python | test/util/plot/util_plot_style.py | bomtuckle/pyrolite | c0af0ade14ff26b4e9fdd5a033b27e73df085c55 | [
"BSD-3-Clause"
] | 69 | 2019-02-25T00:17:53.000Z | 2022-03-31T17:26:48.000Z | test/util/plot/util_plot_style.py | bomtuckle/pyrolite | c0af0ade14ff26b4e9fdd5a033b27e73df085c55 | [
"BSD-3-Clause"
] | 68 | 2018-07-20T09:01:01.000Z | 2022-03-31T16:28:36.000Z | test/util/plot/util_plot_style.py | bomtuckle/pyrolite | c0af0ade14ff26b4e9fdd5a033b27e73df085c55 | [
"BSD-3-Clause"
] | 24 | 2018-10-02T04:32:10.000Z | 2021-11-10T08:24:17.000Z | import unittest
import matplotlib.lines
from pyrolite.util.plot.style import (
marker_cycle,
linekwargs,
scatterkwargs,
patchkwargs,
_mpl_sp_kw_split,
)
if __name__ == "__main__":
unittest.main()
| 20.888889 | 65 | 0.606383 | import unittest
import matplotlib.lines
from pyrolite.util.plot.style import (
marker_cycle,
linekwargs,
scatterkwargs,
patchkwargs,
_mpl_sp_kw_split,
)
class TestMarkerCycle(unittest.TestCase):
def test_iterable(self):
mkrs = marker_cycle()
for i in range(15):
... | 224 | 20 | 81 |
5c741966de8e291cbbe99d7d83b47cca6486ae2d | 1,153 | py | Python | src/brokkr/outputs/binaryfile.py | project-mjolnir/brokkr | 1785ca5e314f90f3f739ba9ff0d97749317b8a00 | [
"MIT"
] | 2 | 2022-01-14T21:20:06.000Z | 2022-01-17T18:37:25.000Z | src/brokkr/outputs/binaryfile.py | CAM-Gerlach/brokkr | 1785ca5e314f90f3f739ba9ff0d97749317b8a00 | [
"MIT"
] | null | null | null | src/brokkr/outputs/binaryfile.py | CAM-Gerlach/brokkr | 1785ca5e314f90f3f739ba9ff0d97749317b8a00 | [
"MIT"
] | 2 | 2020-08-24T16:11:22.000Z | 2022-03-14T06:15:35.000Z | """
Data output to a binary file.
"""
# Local imports
import brokkr.pipeline.baseoutput
import brokkr.pipeline.utils
| 30.342105 | 71 | 0.631396 | """
Data output to a binary file.
"""
# Local imports
import brokkr.pipeline.baseoutput
import brokkr.pipeline.utils
class BinaryFileOutput(brokkr.pipeline.baseoutput.FileOutputStep):
def __init__(
self,
str_encoding="utf-8",
extension="bin",
skip_na=True,
... | 913 | 45 | 76 |
e09cba69846083d33cc8386cd6e025bb40f65cb2 | 207 | py | Python | tools/csv-to-array.py | Kyuchumimo/Pygame-80 | 4d04f0a16b80c7e747e30c3f86c15728f26f272a | [
"MIT"
] | 4 | 2021-11-20T20:33:27.000Z | 2022-03-17T16:22:29.000Z | tools/csv-to-array.py | Kyuchumimo/Pygame-80 | 4d04f0a16b80c7e747e30c3f86c15728f26f272a | [
"MIT"
] | null | null | null | tools/csv-to-array.py | Kyuchumimo/Pygame-80 | 4d04f0a16b80c7e747e30c3f86c15728f26f272a | [
"MIT"
] | null | null | null | #Tool by Ghast with some changes
with open("path/file.csv", 'r') as file:
txt = "".join(file.readlines())
print("([ " + "\n ".join(["[{}],".format(t) for t in txt.split("\n") if t])[:-1] + " ])")
| 34.5 | 95 | 0.521739 | #Tool by Ghast with some changes
with open("path/file.csv", 'r') as file:
txt = "".join(file.readlines())
print("([ " + "\n ".join(["[{}],".format(t) for t in txt.split("\n") if t])[:-1] + " ])")
| 0 | 0 | 0 |
eaff6968f840ba05a9b7445195d6f35bb5b2fedf | 1,143 | py | Python | pandas_drf_tools/viewsets.py | abarto/pandas-drf-tools | ec754ac75327e6ee5a1efd256a572a9a531e4d28 | [
"BSD-3-Clause"
] | 8 | 2016-10-31T15:07:28.000Z | 2021-04-19T06:20:18.000Z | pandas_drf_tools/viewsets.py | abarto/pandas-drf-tools | ec754ac75327e6ee5a1efd256a572a9a531e4d28 | [
"BSD-3-Clause"
] | null | null | null | pandas_drf_tools/viewsets.py | abarto/pandas-drf-tools | ec754ac75327e6ee5a1efd256a572a9a531e4d28 | [
"BSD-3-Clause"
] | 1 | 2018-11-15T14:05:30.000Z | 2018-11-15T14:05:30.000Z | from rest_framework.viewsets import ViewSetMixin
from pandas_drf_tools import generics, mixins
class GenericDataFrameViewSet(ViewSetMixin, generics.GenericDataFrameAPIView):
"""
The GenericDataFrameViewSet class does not provide any actions by default,
but does include the base set of generic view behavi... | 32.657143 | 78 | 0.63692 | from rest_framework.viewsets import ViewSetMixin
from pandas_drf_tools import generics, mixins
class GenericDataFrameViewSet(ViewSetMixin, generics.GenericDataFrameAPIView):
"""
The GenericDataFrameViewSet class does not provide any actions by default,
but does include the base set of generic view behavi... | 0 | 0 | 0 |
32263f0357794fece5edef46f06e76e7144b0b82 | 1,115 | py | Python | third_party/WebKit/LayoutTests/http/tests/websocket/connection-throttling_wsh.py | google-ar/chromium | 2441c86a5fd975f09a6c30cddb57dfb7fc239699 | [
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 777 | 2017-08-29T15:15:32.000Z | 2022-03-21T05:29:41.000Z | third_party/WebKit/LayoutTests/http/tests/websocket/connection-throttling_wsh.py | harrymarkovskiy/WebARonARCore | 2441c86a5fd975f09a6c30cddb57dfb7fc239699 | [
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 66 | 2017-08-30T18:31:18.000Z | 2021-08-02T10:59:35.000Z | third_party/WebKit/LayoutTests/http/tests/websocket/connection-throttling_wsh.py | harrymarkovskiy/WebARonARCore | 2441c86a5fd975f09a6c30cddb57dfb7fc239699 | [
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 123 | 2017-08-30T01:19:34.000Z | 2022-03-17T22:55:31.000Z | import cgi
import time
import threading
lock = threading.Lock()
connections = set()
next_test_id = 0
def new_test(request):
"""Allocate a unique test id."""
global lock, next_test_id
with lock:
request.response = str(next_test_id)
next_test_id += 1
def do_test(request, params):
""... | 22.755102 | 71 | 0.64574 | import cgi
import time
import threading
lock = threading.Lock()
connections = set()
next_test_id = 0
def web_socket_do_extra_handshake(request):
query_string = request.ws_resource.split('?', 1)
if len(query_string) == 1:
return
params = cgi.parse_qs(query_string[1])
mode = params["mode"][0]
... | 401 | 0 | 46 |
fbfe3ba14600bf7b322652be7051c9351321f08e | 963 | py | Python | app/libs/configLib/opasIJPConfig.py | Psychoanalytic-Electronic-Publishing/openpubarchive | afd2a281ebacf8404791c11a21c06a0ae135f2a7 | [
"Apache-2.0"
] | 1 | 2019-04-01T14:45:33.000Z | 2019-04-01T14:45:33.000Z | app/libs/configLib/opasIJPConfig.py | Psychoanalytic-Electronic-Publishing/openpubarchive | afd2a281ebacf8404791c11a21c06a0ae135f2a7 | [
"Apache-2.0"
] | 46 | 2019-05-14T14:16:15.000Z | 2020-08-06T03:45:12.000Z | app/libs/configLib/opasIJPConfig.py | nrshapiro/openpubarchive | f6d3b7da6cd23e51b32e16e17ccb55b8511d32a6 | [
"Apache-2.0"
] | 1 | 2020-08-26T15:25:28.000Z | 2020-08-26T15:25:28.000Z |
#IJPOpen IssueTitles by issue number (used to sort IJPOpen by issuetitle)
IJPOPENISSUES = {
"Announcement": 1,
"Annuals Report": 2,
"Book Review Essay": 3,
"Book Reviews": 4,
"Book and Journal Reviews": 5,
"Child and Adolescent Psychoanalysis": 6,
"Clinical Communications": 7,
"Correcti... | 27.514286 | 73 | 0.632399 |
#IJPOpen IssueTitles by issue number (used to sort IJPOpen by issuetitle)
IJPOPENISSUES = {
"Announcement": 1,
"Annuals Report": 2,
"Book Review Essay": 3,
"Book Reviews": 4,
"Book and Journal Reviews": 5,
"Child and Adolescent Psychoanalysis": 6,
"Clinical Communications": 7,
"Correcti... | 0 | 0 | 0 |
77307f2c3b8902fab7545f46f61b0dedee3a1e6c | 2,914 | py | Python | test/test_bayesian_inference_methods.py | quizlet/abracadabra | eda599bd02f14b96efdc521f53132d93c9100ede | [
"MIT"
] | 24 | 2020-06-12T16:12:32.000Z | 2021-09-01T12:25:38.000Z | test/test_bayesian_inference_methods.py | quizlet/abracadabra | eda599bd02f14b96efdc521f53132d93c9100ede | [
"MIT"
] | 20 | 2020-06-12T06:26:08.000Z | 2022-03-12T00:57:51.000Z | test/test_bayesian_inference_methods.py | quizlet/abracadabra | eda599bd02f14b96efdc521f53132d93c9100ede | [
"MIT"
] | 4 | 2020-06-14T12:14:11.000Z | 2021-05-28T15:36:44.000Z | import pytest
from abra import Experiment, HypothesisTest
from abra.inference.bayesian import get_stan_model_code
from abra.inference.bayesian.models.binary import beta_binomial, binomial, bernoulli
from abra.inference.bayesian.models.continuous import gaussian, exp_student_t
from abra.inference.bayesian.models.counts ... | 35.975309 | 84 | 0.732327 | import pytest
from abra import Experiment, HypothesisTest
from abra.inference.bayesian import get_stan_model_code
from abra.inference.bayesian.models.binary import beta_binomial, binomial, bernoulli
from abra.inference.bayesian.models.continuous import gaussian, exp_student_t
from abra.inference.bayesian.models.counts ... | 1,658 | 0 | 88 |
1bdd2d7e76e97d21b66c6c30889b982b92354d88 | 795 | py | Python | itembase/core/urls/staffing_urls.py | wedwardbeck/ibase | 5647fa5aff6c1bdc99b6c93884ff0d5aef17d85b | [
"MIT"
] | null | null | null | itembase/core/urls/staffing_urls.py | wedwardbeck/ibase | 5647fa5aff6c1bdc99b6c93884ff0d5aef17d85b | [
"MIT"
] | 9 | 2020-01-17T14:16:08.000Z | 2020-02-18T15:07:40.000Z | itembase/core/urls/staffing_urls.py | wedwardbeck/ibase | 5647fa5aff6c1bdc99b6c93884ff0d5aef17d85b | [
"MIT"
] | null | null | null | from django.urls import path
from itembase.core.views.staffing_views import ProjectManagerListView, TeamLeadListView, TeamListView, \
TeamMemberCreateView, TeamMemberClientCreateView, TeamMemberDetailView, TeamMemberUpdateView
app_name = "staff"
urlpatterns = [
# Client URL Patterns
path('', TeamListView... | 41.842105 | 104 | 0.727044 | from django.urls import path
from itembase.core.views.staffing_views import ProjectManagerListView, TeamLeadListView, TeamListView, \
TeamMemberCreateView, TeamMemberClientCreateView, TeamMemberDetailView, TeamMemberUpdateView
app_name = "staff"
urlpatterns = [
# Client URL Patterns
path('', TeamListView... | 0 | 0 | 0 |
310c7df1f0f9e5bde45ca6f11e217475a48685e6 | 1,457 | py | Python | scripts/dcj/dcjall.py | metaflow/contests | 5e9ffcb72c3e7da54b5e0818b1afa59f5778ffa2 | [
"MIT"
] | 1 | 2019-05-12T23:41:00.000Z | 2019-05-12T23:41:00.000Z | scripts/dcj/dcjall.py | metaflow/contests | 5e9ffcb72c3e7da54b5e0818b1afa59f5778ffa2 | [
"MIT"
] | null | null | null | scripts/dcj/dcjall.py | metaflow/contests | 5e9ffcb72c3e7da54b5e0818b1afa59f5778ffa2 | [
"MIT"
] | null | null | null | #!/usr/bin/python
import sys
import os
import re
import subprocess
if len(sys.argv) < 3:
print("provide problem name and number of nodes")
exit(1)
problemName = sys.argv[1]
nodeCount = sys.argv[2]
for file in os.listdir('.'):
if not re.match(problemName + '.+\.h$', file):
# print(file, "X")
... | 36.425 | 92 | 0.540837 | #!/usr/bin/python
import sys
import os
import re
import subprocess
if len(sys.argv) < 3:
print("provide problem name and number of nodes")
exit(1)
problemName = sys.argv[1]
nodeCount = sys.argv[2]
for file in os.listdir('.'):
if not re.match(problemName + '.+\.h$', file):
# print(file, "X")
... | 0 | 0 | 0 |
9cb03cd0c43dd3a253e43ad59681fff4e0cf9e26 | 2,442 | py | Python | app.py | asinghal17/projectnic | c403773fe8dee8fdc81d290a765b03c4a144fd28 | [
"MIT"
] | null | null | null | app.py | asinghal17/projectnic | c403773fe8dee8fdc81d290a765b03c4a144fd28 | [
"MIT"
] | null | null | null | app.py | asinghal17/projectnic | c403773fe8dee8fdc81d290a765b03c4a144fd28 | [
"MIT"
] | null | null | null | import os
import logging
from flask import Flask,request,render_template
from flask_cache import Cache
from flask_compress import Compress
from lib import gscrape
from time import time
chap = "1blZPkNxrw3ovfLvqD76eUzTuME34N2bl1fSTdaMjX2c"
marq = "1wFK2aPJmXjAQAx3rT2vF7H-8NvveWQ7tuXdEoemhZ1M"
board = "1JbaMwsPHbN3og_ig... | 27.75 | 122 | 0.774775 | import os
import logging
from flask import Flask,request,render_template
from flask_cache import Cache
from flask_compress import Compress
from lib import gscrape
from time import time
chap = "1blZPkNxrw3ovfLvqD76eUzTuME34N2bl1fSTdaMjX2c"
marq = "1wFK2aPJmXjAQAx3rT2vF7H-8NvveWQ7tuXdEoemhZ1M"
board = "1JbaMwsPHbN3og_ig... | 875 | 0 | 286 |
f020de87f729c05ecab0fa899e0fdc816f946705 | 1,873 | py | Python | qa/L0_e2e/test_model.py | rapidsai/rapids-triton-template | df645ea6442b530de22b18e6adb115bb70e1c7d3 | [
"Apache-2.0",
"Unlicense"
] | null | null | null | qa/L0_e2e/test_model.py | rapidsai/rapids-triton-template | df645ea6442b530de22b18e6adb115bb70e1c7d3 | [
"Apache-2.0",
"Unlicense"
] | null | null | null | qa/L0_e2e/test_model.py | rapidsai/rapids-triton-template | df645ea6442b530de22b18e6adb115bb70e1c7d3 | [
"Apache-2.0",
"Unlicense"
] | null | null | null | # Copyright (c) 2021, NVIDIA CORPORATION.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 31.216667 | 74 | 0.711692 | # Copyright (c) 2021, NVIDIA CORPORATION.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 678 | 0 | 89 |
6a5fce27d8838673500514161dace7dd34496f21 | 18,069 | py | Python | test_decode.py | akpandeya/odisoft-test | 3563fb8d3b83b2e6e7c1cd917474690b6dd109d4 | [
"MIT"
] | null | null | null | test_decode.py | akpandeya/odisoft-test | 3563fb8d3b83b2e6e7c1cd917474690b6dd109d4 | [
"MIT"
] | null | null | null | test_decode.py | akpandeya/odisoft-test | 3563fb8d3b83b2e6e7c1cd917474690b6dd109d4 | [
"MIT"
] | null | null | null | import unittest
from decode import hex_to_dec, get_bool, hex_to_binary_int_string, hex_to_binary_string_list, invert_string, get_data_status
from decode import format_hex, bin_to_dec, binary_to_on_off, get_digital_io_status, get_alarm, get_reverse
from decode import get_battery, hex_to_float, make_decimal
... | 64.996403 | 200 | 0.630638 | import unittest
from decode import hex_to_dec, get_bool, hex_to_binary_int_string, hex_to_binary_string_list, invert_string, get_data_status
from decode import format_hex, bin_to_dec, binary_to_on_off, get_digital_io_status, get_alarm, get_reverse
from decode import get_battery, hex_to_float, make_decimal
class TestSt... | 17,164 | 22 | 473 |
ed133590646e67d6382481de06d6028b4e5853f5 | 1,348 | py | Python | scripts/sendalert.py | Zagyarakushi/CHS | 2f1f6f8842313a2419946c913b177ac6cac98476 | [
"MIT"
] | null | null | null | scripts/sendalert.py | Zagyarakushi/CHS | 2f1f6f8842313a2419946c913b177ac6cac98476 | [
"MIT"
] | null | null | null | scripts/sendalert.py | Zagyarakushi/CHS | 2f1f6f8842313a2419946c913b177ac6cac98476 | [
"MIT"
] | null | null | null | import smtplib
from email.mime.text import MIMEText
from email.mime.multipart import MIMEMultipart
from email.mime.base import MIMEBase
from email import encoders
import os
email = 'xxxx@xxxx.com'
password = 'xxxx'
send_to_emails = ['xxxx@xxxx.com', 'xxxx@xxxx.com'] # List of email addresses
subject = 'xxxx'
message =... | 29.955556 | 85 | 0.642433 | import smtplib
from email.mime.text import MIMEText
from email.mime.multipart import MIMEMultipart
from email.mime.base import MIMEBase
from email import encoders
import os
email = 'xxxx@xxxx.com'
password = 'xxxx'
send_to_emails = ['xxxx@xxxx.com', 'xxxx@xxxx.com'] # List of email addresses
subject = 'xxxx'
message =... | 0 | 0 | 0 |
7a391788a188542e9a1450ff50afc0f941cefabf | 3,504 | py | Python | face_manager/management/commands/deprecated/inception_features.py | benjaminlewis-1000/django_picasa | 029e30786e1acb53d864ff185c1a26274084f739 | [
"MIT"
] | null | null | null | face_manager/management/commands/deprecated/inception_features.py | benjaminlewis-1000/django_picasa | 029e30786e1acb53d864ff185c1a26274084f739 | [
"MIT"
] | 22 | 2021-04-08T18:42:18.000Z | 2022-03-12T00:12:02.000Z | face_manager/management/commands/deprecated/inception_features.py | benjaminlewis-1000/django_picasa | 029e30786e1acb53d864ff185c1a26274084f739 | [
"MIT"
] | null | null | null | #! /usr/bin/env python
from django.core.management.base import BaseCommand
from face_manager import models as face_models
from facenet_pytorch import MTCNN, InceptionResnetV1
from filepopulator import models as file_models
from io import BytesIO
from PIL import Image, ExifTags
import cv2
import matplotlib.pyplot as pl... | 29.694915 | 78 | 0.640411 | #! /usr/bin/env python
from django.core.management.base import BaseCommand
from face_manager import models as face_models
from facenet_pytorch import MTCNN, InceptionResnetV1
from filepopulator import models as file_models
from io import BytesIO
from PIL import Image, ExifTags
import cv2
import matplotlib.pyplot as pl... | 2,992 | 6 | 127 |
450c4a53241e0756f399c22190d4cb19584b9d9c | 716 | py | Python | fritzlog/management/commands/fritz_parse_captures.py | defgsus/fritztrack | a433f0c373cad992889c447b5283394cf321ff44 | [
"MIT"
] | 1 | 2020-09-16T14:44:36.000Z | 2020-09-16T14:44:36.000Z | fritzlog/management/commands/fritz_parse_captures.py | defgsus/fritztrack | a433f0c373cad992889c447b5283394cf321ff44 | [
"MIT"
] | null | null | null | fritzlog/management/commands/fritz_parse_captures.py | defgsus/fritztrack | a433f0c373cad992889c447b5283394cf321ff44 | [
"MIT"
] | null | null | null | # encoding=utf-8
from __future__ import unicode_literals, print_function
import datetime
from django.core.management.base import BaseCommand, CommandError
from django.db import transaction
from django.utils.translation import ugettext_lazy as _
| 27.538462 | 72 | 0.717877 | # encoding=utf-8
from __future__ import unicode_literals, print_function
import datetime
from django.core.management.base import BaseCommand, CommandError
from django.db import transaction
from django.utils.translation import ugettext_lazy as _
class Command(BaseCommand):
help = _('Parse all (new) capture files... | 338 | 106 | 23 |
f0193054d36a0c6e8471e9bef2ea730de7f9933f | 2,569 | py | Python | models/fcos/model.py | AI-UI-GmbH/AI-Lab | 68b87e44cf23d15a407c5e5895fea037a4ca2bb7 | [
"MIT"
] | 4 | 2020-11-28T14:54:15.000Z | 2021-07-02T10:00:00.000Z | models/fcos/model.py | AI-UI-GmbH/AI-Lab | 68b87e44cf23d15a407c5e5895fea037a4ca2bb7 | [
"MIT"
] | 1 | 2021-04-20T08:26:33.000Z | 2021-04-20T09:26:34.000Z | models/fcos/model.py | AI-UI-GmbH/AI-Lab | 68b87e44cf23d15a407c5e5895fea037a4ca2bb7 | [
"MIT"
] | 1 | 2021-03-08T07:43:03.000Z | 2021-03-08T07:43:03.000Z | import tensorflow as tf
import tensorflow.keras.layers as KL
from utils import conv_block
def FCOS(cfg, backbone=None, top_layer=None):
"""return FCOS as keras model
Arguments:
cfg: dict
backbone: str or keras model
top_layer:
Returns:
keras model of FCOS
"""
# ... | 30.951807 | 113 | 0.65434 | import tensorflow as tf
import tensorflow.keras.layers as KL
from utils import conv_block
def FCOS(cfg, backbone=None, top_layer=None):
"""return FCOS as keras model
Arguments:
cfg: dict
backbone: str or keras model
top_layer:
Returns:
keras model of FCOS
"""
# ... | 0 | 0 | 0 |
2133d7487ed2eafa972936d2c2ce5a9de7a8b771 | 1,135 | py | Python | python_for_beginners/nested_loops_exs/cinema_tickets.py | deboradyankova/python_education | 41c246ae50b4bf0f372f7b8b2de8d02391eaad7a | [
"MIT"
] | null | null | null | python_for_beginners/nested_loops_exs/cinema_tickets.py | deboradyankova/python_education | 41c246ae50b4bf0f372f7b8b2de8d02391eaad7a | [
"MIT"
] | null | null | null | python_for_beginners/nested_loops_exs/cinema_tickets.py | deboradyankova/python_education | 41c246ae50b4bf0f372f7b8b2de8d02391eaad7a | [
"MIT"
] | null | null | null | standard_tickets = 0
student_tickets = 0
kid_tickets = 0
finished = False
while not finished:
movie = input()
seats = int(input())
capacity = seats
while True:
ticket = input()
if ticket == 'Finish' or ticket == 'End':
if ticket == 'Finish':
... | 27.02381 | 76 | 0.547137 | standard_tickets = 0
student_tickets = 0
kid_tickets = 0
finished = False
while not finished:
movie = input()
seats = int(input())
capacity = seats
while True:
ticket = input()
if ticket == 'Finish' or ticket == 'End':
if ticket == 'Finish':
... | 0 | 0 | 0 |
7d4e6842bd7e8d86d0c6e9897e04fb4946613393 | 10,955 | py | Python | data_gateway/persistence.py | aerosense-ai/data-gateway | 019b8e4a114e16d363a3167171a457cefdbf004f | [
"Apache-2.0"
] | null | null | null | data_gateway/persistence.py | aerosense-ai/data-gateway | 019b8e4a114e16d363a3167171a457cefdbf004f | [
"Apache-2.0"
] | 34 | 2021-12-20T14:51:57.000Z | 2022-03-30T16:47:04.000Z | data_gateway/persistence.py | aerosense-ai/data-gateway | 019b8e4a114e16d363a3167171a457cefdbf004f | [
"Apache-2.0"
] | null | null | null | import abc
import copy
import csv
import json
import multiprocessing
import os
import time
from octue.cloud import storage
from octue.cloud.storage.client import GoogleCloudStorageClient
from octue.utils.persistence import calculate_disk_usage, get_oldest_file_in_directory
logger = multiprocessing.get_logger()
DEFA... | 35.453074 | 119 | 0.651848 | import abc
import copy
import csv
import json
import multiprocessing
import os
import time
from octue.cloud import storage
from octue.cloud.storage.client import GoogleCloudStorageClient
from octue.utils.persistence import calculate_disk_usage, get_oldest_file_in_directory
logger = multiprocessing.get_logger()
DEFA... | 1,912 | 0 | 189 |
9c762434c52f955ebc7c85dcc7d574e327d2dcf0 | 1,205 | py | Python | old/test/test_utils/test_cifar_10_data.py | Faaizz/computer_vision | a6145c6b3b7d8b3492e85932fe96da6f46fcd0d4 | [
"RSA-MD"
] | null | null | null | old/test/test_utils/test_cifar_10_data.py | Faaizz/computer_vision | a6145c6b3b7d8b3492e85932fe96da6f46fcd0d4 | [
"RSA-MD"
] | 10 | 2021-03-31T20:18:26.000Z | 2022-02-10T02:35:09.000Z | old/test/test_utils/test_cifar_10_data.py | Faaizz/computer_vision | a6145c6b3b7d8b3492e85932fe96da6f46fcd0d4 | [
"RSA-MD"
] | null | null | null | import unittest
import sys
import numpy as np
import src.utils.cifar_10_data as cifar_10
| 29.390244 | 74 | 0.655602 | import unittest
import sys
import numpy as np
import src.utils.cifar_10_data as cifar_10
class TestCifar10Data(unittest.TestCase):
def test_single_data_sample_length(self):
# Request single batch
res= cifar_10.get_training_data()
# get data
data= res["data"]
# verify that ... | 960 | 131 | 23 |
c3924ae4925dcec00bd3df99ed04d15b89201408 | 2,510 | py | Python | quantumteleport.py | Ixss82/Tutorials | 37c91ceee406e9b580f204105d531ccb789ad569 | [
"MIT"
] | 38 | 2019-11-10T05:02:58.000Z | 2022-03-28T05:02:16.000Z | quantumteleport.py | Ixss82/Tutorials | 37c91ceee406e9b580f204105d531ccb789ad569 | [
"MIT"
] | null | null | null | quantumteleport.py | Ixss82/Tutorials | 37c91ceee406e9b580f204105d531ccb789ad569 | [
"MIT"
] | 2 | 2020-04-22T18:28:18.000Z | 2020-12-02T22:23:57.000Z | import qiskit as qk
from qiskit import ClassicalRegister, QuantumRegister, QuantumCircuit
from qiskit import execute, Aer
from qiskit import IBMQ
from qiskit.visualization import plot_histogram
import matplotlib
secret_unitary = "hz"
# simple function that applies a series of unitary gates from a given string
# Creat... | 32.597403 | 115 | 0.707171 | import qiskit as qk
from qiskit import ClassicalRegister, QuantumRegister, QuantumCircuit
from qiskit import execute, Aer
from qiskit import IBMQ
from qiskit.visualization import plot_histogram
import matplotlib
secret_unitary = "hz"
# simple function that applies a series of unitary gates from a given string
def appl... | 559 | 0 | 22 |
79f6c05ef0b7790c4357518a615bf6eb5bb89528 | 4,257 | py | Python | emp_uncertainty/dropout_rate/cifar_dropout.py | testingautomated-usi/repli-stvr2022-uncertainty | c4ef27721e9d3e2b44d328cc99b0e2616b99ef12 | [
"MIT"
] | null | null | null | emp_uncertainty/dropout_rate/cifar_dropout.py | testingautomated-usi/repli-stvr2022-uncertainty | c4ef27721e9d3e2b44d328cc99b0e2616b99ef12 | [
"MIT"
] | null | null | null | emp_uncertainty/dropout_rate/cifar_dropout.py | testingautomated-usi/repli-stvr2022-uncertainty | c4ef27721e9d3e2b44d328cc99b0e2616b99ef12 | [
"MIT"
] | null | null | null | import os
import numpy as np
import tensorflow as tf
import uncertainty_wizard as uwiz
from emp_uncertainty.case_studies.case_study import BASE_MODEL_SAVE_FOLDER, BASE_OUTPUTS_SAVE_FOLDER
from emp_uncertainty.case_studies.plain_classifiers import cifar10
from emp_uncertainty.dropout_rate.utils import rate_from_model_... | 43.438776 | 113 | 0.690392 | import os
import numpy as np
import tensorflow as tf
import uncertainty_wizard as uwiz
from emp_uncertainty.case_studies.case_study import BASE_MODEL_SAVE_FOLDER, BASE_OUTPUTS_SAVE_FOLDER
from emp_uncertainty.case_studies.plain_classifiers import cifar10
from emp_uncertainty.dropout_rate.utils import rate_from_model_... | 3,139 | 0 | 69 |
5bc582991a413b2ba07c5f19269a2c90a04f6184 | 16,873 | py | Python | tests/integration/coordinator/plugins/clickhouse/conftest.py | aiven/astacus | 2d64e1f33e01d50a41127f41d9da3d1ab0ce0387 | [
"Apache-2.0"
] | 19 | 2020-06-22T12:17:59.000Z | 2022-02-18T00:12:17.000Z | tests/integration/coordinator/plugins/clickhouse/conftest.py | aiven/astacus | 2d64e1f33e01d50a41127f41d9da3d1ab0ce0387 | [
"Apache-2.0"
] | 7 | 2020-06-24T05:16:20.000Z | 2022-02-28T07:35:31.000Z | tests/integration/coordinator/plugins/clickhouse/conftest.py | aiven/astacus | 2d64e1f33e01d50a41127f41d9da3d1ab0ce0387 | [
"Apache-2.0"
] | 2 | 2020-09-05T21:23:08.000Z | 2022-02-17T15:02:37.000Z | """
Copyright (c) 2021 Aiven Ltd
See LICENSE for details
"""
from astacus.client import create_client_parsers
from astacus.common.ipc import Plugin
from astacus.common.rohmustorage import (
RohmuCompression, RohmuCompressionType, RohmuConfig, RohmuEncryptionKey, RohmuLocalStorageConfig, RohmuStorageType
)
from asta... | 41.559113 | 125 | 0.635335 | """
Copyright (c) 2021 Aiven Ltd
See LICENSE for details
"""
from astacus.client import create_client_parsers
from astacus.common.ipc import Plugin
from astacus.common.rohmustorage import (
RohmuCompression, RohmuCompressionType, RohmuConfig, RohmuEncryptionKey, RohmuLocalStorageConfig, RohmuStorageType
)
from asta... | 14,033 | 183 | 501 |
7f19103a2d52aa9ea8d844c3bc21561c35e2e2aa | 1,864 | py | Python | test_ytreporty.py | understood/ytreporty | 1042b27430fe333d34f75e42d9a2dadfc1b7b29d | [
"Apache-2.0"
] | 1 | 2019-07-12T20:17:29.000Z | 2019-07-12T20:17:29.000Z | test_ytreporty.py | understood/ytreporty | 1042b27430fe333d34f75e42d9a2dadfc1b7b29d | [
"Apache-2.0"
] | null | null | null | test_ytreporty.py | understood/ytreporty | 1042b27430fe333d34f75e42d9a2dadfc1b7b29d | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8; mode: Python; -*-
#
# 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... | 34.518519 | 83 | 0.703326 | # -*- coding: utf-8; mode: Python; -*-
#
# 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... | 105 | 903 | 99 |
6e7557daefdab3b40588aa64b3b93cd547792503 | 408 | py | Python | While/exercicio4.py | JoaoFelipe-AlvesOliveira/LearningPython | ecc500956a99b9b6852cd6502f928bc0ebc34dff | [
"MIT"
] | null | null | null | While/exercicio4.py | JoaoFelipe-AlvesOliveira/LearningPython | ecc500956a99b9b6852cd6502f928bc0ebc34dff | [
"MIT"
] | null | null | null | While/exercicio4.py | JoaoFelipe-AlvesOliveira/LearningPython | ecc500956a99b9b6852cd6502f928bc0ebc34dff | [
"MIT"
] | null | null | null | base= int(input("Digite o numero base da potencia"))
expoente= int(input("Digite o numero expoente da potencia"))
if expoente <0:
print("Erro: O expoente não pode ser negativo")
else:
contador= 0
resultado= 1
while contador < expoente:
resultado=resultado*base
conta... | 22.666667 | 60 | 0.605392 | base= int(input("Digite o numero base da potencia"))
expoente= int(input("Digite o numero expoente da potencia"))
if expoente <0:
print("Erro: O expoente não pode ser negativo")
else:
contador= 0
resultado= 1
while contador < expoente:
resultado=resultado*base
conta... | 0 | 0 | 0 |
c8ff6ac093ced02a80d7192f5ab3e61cca9ed1f2 | 5,949 | py | Python | ldsnotes/content.py | contagon/ldsnotes | 46840c17bf0451221d1ffeeb772a309c4166817f | [
"MIT"
] | 3 | 2020-12-26T17:51:53.000Z | 2021-05-26T17:25:13.000Z | ldsnotes/content.py | contagon/ldsnotes | 46840c17bf0451221d1ffeeb772a309c4166817f | [
"MIT"
] | 5 | 2020-12-23T05:36:59.000Z | 2021-08-24T20:25:41.000Z | ldsnotes/content.py | contagon/ldsnotes | 46840c17bf0451221d1ffeeb772a309c4166817f | [
"MIT"
] | null | null | null | import requests
import html.parser
import re
H = html.parser.HTMLParser()
CONTENT = "https://www.churchofjesuschrist.org/content/api/v2"
def clean_html(text):
"""Takes in html code and cleans it. Note that footnotes
are replaced with # for word counting later.
Parameters
-----------
text : s... | 36.722222 | 330 | 0.547823 | import requests
import html.parser
import re
H = html.parser.HTMLParser()
CONTENT = "https://www.churchofjesuschrist.org/content/api/v2"
def clean_html(text):
"""Takes in html code and cleans it. Note that footnotes
are replaced with # for word counting later.
Parameters
-----------
text : s... | 953 | 0 | 54 |
0aa0e34273f01fed93f0df641117d59fccf2986d | 1,064 | py | Python | __scraping__/tripadvisor.com - selenium/main-count-reviews-on-profile.py | furas/python-code | 223d8245c6a2a058031f302feaffd9a4f900110e | [
"MIT"
] | 2 | 2015-12-12T20:14:12.000Z | 2016-08-13T00:42:10.000Z | __scraping__/tripadvisor.com - selenium/main-count-reviews-on-profile.py | furas/python-code | 223d8245c6a2a058031f302feaffd9a4f900110e | [
"MIT"
] | null | null | null | __scraping__/tripadvisor.com - selenium/main-count-reviews-on-profile.py | furas/python-code | 223d8245c6a2a058031f302feaffd9a4f900110e | [
"MIT"
] | null | null | null | # author: Bartlomiej "furas" Burek (https://blog.furas.pl)
# date: 2022.04.11
from selenium import webdriver
from selenium.webdriver.common.by import By
#from webdriver_manager.chrome import ChromeDriverManager
from webdriver_manager.firefox import GeckoDriverManager
import time
url = 'https://www.tripadvisor.com/Pro... | 28 | 100 | 0.730263 | # author: Bartlomiej "furas" Burek (https://blog.furas.pl)
# date: 2022.04.11
from selenium import webdriver
from selenium.webdriver.common.by import By
#from webdriver_manager.chrome import ChromeDriverManager
from webdriver_manager.firefox import GeckoDriverManager
import time
url = 'https://www.tripadvisor.com/Pro... | 0 | 0 | 0 |
800a7703037b4069877c76209b967e9aa1656d1b | 3,369 | py | Python | collect/collect08Hmdb.py | glm729/mtdtag | 0f2103342c6efd5175e2638f2ae762b837620e61 | [
"BSD-4-Clause"
] | null | null | null | collect/collect08Hmdb.py | glm729/mtdtag | 0f2103342c6efd5175e2638f2ae762b837620e61 | [
"BSD-4-Clause"
] | 6 | 2021-03-29T04:25:34.000Z | 2021-06-04T03:48:44.000Z | collect/collect08Hmdb.py | glm729/mtdtag | 0f2103342c6efd5175e2638f2ae762b837620e61 | [
"BSD-4-Clause"
] | 2 | 2021-06-18T19:42:09.000Z | 2021-07-22T04:48:46.000Z | #!/usr/bin/env python3
# Required imports
# -----------------------------------------------------------------------------
import json
import os
import functools as ft
import multiprocessing as mp
import xmltodict as xd
# Function definitions
# ----------------------------------------------------------------------... | 26.116279 | 79 | 0.570496 | #!/usr/bin/env python3
# Required imports
# -----------------------------------------------------------------------------
import json
import os
import functools as ft
import multiprocessing as mp
import xmltodict as xd
# Function definitions
# ----------------------------------------------------------------------... | 1,237 | 0 | 110 |
52935524fdd04ab3aad5b99a96020fa25d8790c3 | 3,215 | py | Python | tools/test_net.py | Willy0919/Evovling_Boxes | a8543227f9e715d67dde1ffe62ee6d0400cca517 | [
"BSD-3-Clause"
] | 74 | 2017-04-07T13:18:39.000Z | 2021-05-20T01:35:31.000Z | tools/test_net.py | Willy0919/Evovling_Boxes | a8543227f9e715d67dde1ffe62ee6d0400cca517 | [
"BSD-3-Clause"
] | 10 | 2017-06-22T12:54:17.000Z | 2021-06-28T11:28:11.000Z | tools/test_net.py | Willy0919/Evovling_Boxes | a8543227f9e715d67dde1ffe62ee6d0400cca517 | [
"BSD-3-Clause"
] | 26 | 2017-06-02T05:54:44.000Z | 2021-03-12T07:53:54.000Z | #!/usr/bin/env python
import _init_paths
from evb.test import test_net
from evb.config import cfg, cfg_from_file, cfg_from_list
from datasets.factory import get_imdb
import caffe
import argparse
import pprint
import time, os, sys
def parse_args():
"""
Parse input arguments
"""
parser = argparse.Argumen... | 36.954023 | 90 | 0.597823 | #!/usr/bin/env python
import _init_paths
from evb.test import test_net
from evb.config import cfg, cfg_from_file, cfg_from_list
from datasets.factory import get_imdb
import caffe
import argparse
import pprint
import time, os, sys
def parse_args():
"""
Parse input arguments
"""
parser = argparse.Argumen... | 0 | 0 | 0 |
d5e3ef78a8e17b443f7b34fba57aac0f36943332 | 2,575 | py | Python | tests/test_main.py | rosetechnology/xdelta3-python | 04490025f5e00baf25de8e515f0dc808343e7134 | [
"Apache-2.0"
] | null | null | null | tests/test_main.py | rosetechnology/xdelta3-python | 04490025f5e00baf25de8e515f0dc808343e7134 | [
"Apache-2.0"
] | null | null | null | tests/test_main.py | rosetechnology/xdelta3-python | 04490025f5e00baf25de8e515f0dc808343e7134 | [
"Apache-2.0"
] | null | null | null | import base64
import os
import string
from pathlib import Path
import pytest
import xdelta3
value_one = b'this is a short string to test with. It is suitable for delta encoding.'
value_two = b'this is a different short string to test with. It is suitable for delta encoding.'
expected_delta = b'\xd6\xc3\xc4\x00\x00\x... | 31.790123 | 101 | 0.706408 | import base64
import os
import string
from pathlib import Path
import pytest
import xdelta3
value_one = b'this is a short string to test with. It is suitable for delta encoding.'
value_two = b'this is a different short string to test with. It is suitable for delta encoding.'
expected_delta = b'\xd6\xc3\xc4\x00\x00\x... | 2,009 | 0 | 184 |
730f3a31c992e0bbccbfb4197f86e892800856ab | 646 | py | Python | libra/client.py | GiuseppeVadrucci/Libra | a12c8b4ab2e13e4a59e7bf6d7431e271c1dc03e8 | [
"Apache-2.0"
] | 2 | 2018-06-02T20:18:23.000Z | 2018-06-02T20:18:27.000Z | libra/client.py | GiuseppeVadrucci/Libra | a12c8b4ab2e13e4a59e7bf6d7431e271c1dc03e8 | [
"Apache-2.0"
] | null | null | null | libra/client.py | GiuseppeVadrucci/Libra | a12c8b4ab2e13e4a59e7bf6d7431e271c1dc03e8 | [
"Apache-2.0"
] | null | null | null | # Echo client program
# This is a simple test client
import socket
import sys
PORT = 80 # The same port as used by the server
| 24.846154 | 82 | 0.586687 | # Echo client program
# This is a simple test client
import socket
import sys
PORT = 80 # The same port as used by the server
def connect(HOST):
s = None
for res in socket.getaddrinfo(HOST, PORT, socket.AF_UNSPEC, socket.SOCK_STREAM):
af, socktype, proto, canonname, sa = res
try:
s ... | 486 | 0 | 22 |
aba99a8940a29f8ffdafe077123930a5ec07bdd0 | 4,894 | py | Python | GearC/contact.py | cfernandesFEUP/Gear-Calculation | c15249c23f97e1168e3316ad5e27ed747758353a | [
"Unlicense"
] | 3 | 2020-09-01T13:19:10.000Z | 2021-12-13T13:59:00.000Z | GearC/contact.py | cfernandesFEUP/Gear-Calculation | c15249c23f97e1168e3316ad5e27ed747758353a | [
"Unlicense"
] | null | null | null | GearC/contact.py | cfernandesFEUP/Gear-Calculation | c15249c23f97e1168e3316ad5e27ed747758353a | [
"Unlicense"
] | null | null | null | import numpy as np
## GEAR FORCES AND POWER LOSS #################################################
## LINES OF CONTACT ###########################################################
## HERTZIAN CONTACT ########################################################### | 44.899083 | 115 | 0.525337 | import numpy as np
## GEAR FORCES AND POWER LOSS #################################################
def forces(torque, omega, rb, rl, alpha_tw, betab, Req, Ra, xl, miu, lxi, mu, b):
Pin = np.outer(omega[0],torque[0])
fbt = 1000*torque[0]/rb[0]
ft = 1000*torque[0]/rl[0]
fr = fbt*np.sin(alpha_tw)
fbn =... | 4,570 | 0 | 66 |
3561331788fba2f2c36c81638f93dfa9bf0167f9 | 3,252 | py | Python | High-Rated-Games-on-Google-Playstore--EDA-&-Data-Preprocessing/code.py | DSOCT18/ga-learner-dsmp-repo | a5c4b13b84115a66190c344def3b30bb926a3ca5 | [
"MIT"
] | null | null | null | High-Rated-Games-on-Google-Playstore--EDA-&-Data-Preprocessing/code.py | DSOCT18/ga-learner-dsmp-repo | a5c4b13b84115a66190c344def3b30bb926a3ca5 | [
"MIT"
] | null | null | null | High-Rated-Games-on-Google-Playstore--EDA-&-Data-Preprocessing/code.py | DSOCT18/ga-learner-dsmp-repo | a5c4b13b84115a66190c344def3b30bb926a3ca5 | [
"MIT"
] | null | null | null | # --------------
#Importing header files
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
data=pd.read_csv(path)
#Code starts here
data['Rating'].plot.hist()
plt.show()
data=data[data['Rating']<=5]
data['Rating'].plot.hist()
plt.show()
#Code ends here
# --------------
# code starts here
to... | 25.809524 | 144 | 0.713407 | # --------------
#Importing header files
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
data=pd.read_csv(path)
#Code starts here
data['Rating'].plot.hist()
plt.show()
data=data[data['Rating']<=5]
data['Rating'].plot.hist()
plt.show()
#Code ends here
# --------------
# code starts here
to... | 0 | 0 | 0 |
5b5a6658bf12151d207933ec943957d27b3983b6 | 31 | py | Python | rascil/workflows/serial/imaging/__init__.py | SKA-ScienceDataProcessor/rascil | bd3b47f779e18e184781e2928ad1539d1fdc1c9b | [
"Apache-2.0"
] | 7 | 2019-12-14T13:42:33.000Z | 2022-01-28T03:31:45.000Z | rascil/workflows/serial/imaging/__init__.py | SKA-ScienceDataProcessor/rascil | bd3b47f779e18e184781e2928ad1539d1fdc1c9b | [
"Apache-2.0"
] | 6 | 2020-01-08T09:40:08.000Z | 2020-06-11T14:56:13.000Z | rascil/workflows/serial/imaging/__init__.py | SKA-ScienceDataProcessor/rascil | bd3b47f779e18e184781e2928ad1539d1fdc1c9b | [
"Apache-2.0"
] | 3 | 2020-01-14T11:14:16.000Z | 2020-09-15T05:21:06.000Z |
from .imaging_serial import *
| 10.333333 | 29 | 0.774194 |
from .imaging_serial import *
| 0 | 0 | 0 |
1835788957303e86c385fcde03b31b03a12f7f19 | 2,535 | py | Python | sysinv/sysinv/sysinv/sysinv/db/sqlalchemy/migrate_repo/versions/117_kube_update_rootca_tables.py | albailey/config | 40ebe63d7dfc6a0a03216ebe55ed3ec9cf5410b9 | [
"Apache-2.0"
] | 10 | 2020-02-07T18:57:44.000Z | 2021-09-11T10:29:34.000Z | sysinv/sysinv/sysinv/sysinv/db/sqlalchemy/migrate_repo/versions/117_kube_update_rootca_tables.py | albailey/config | 40ebe63d7dfc6a0a03216ebe55ed3ec9cf5410b9 | [
"Apache-2.0"
] | 1 | 2021-01-14T12:01:55.000Z | 2021-01-14T12:01:55.000Z | sysinv/sysinv/sysinv/sysinv/db/sqlalchemy/migrate_repo/versions/117_kube_update_rootca_tables.py | albailey/config | 40ebe63d7dfc6a0a03216ebe55ed3ec9cf5410b9 | [
"Apache-2.0"
] | 10 | 2020-10-13T08:37:46.000Z | 2022-02-09T00:21:25.000Z | #
# Copyright (c) 2020 Intel Corporation, Inc.
#
# SPDX-License-Identifier: Apache-2.0
#
from sqlalchemy import Column
from sqlalchemy import DateTime
from sqlalchemy import ForeignKey
from sqlalchemy import Integer
from sqlalchemy import MetaData
from sqlalchemy import String
from sqlalchemy import Table
from sqlalch... | 28.806818 | 74 | 0.650099 | #
# Copyright (c) 2020 Intel Corporation, Inc.
#
# SPDX-License-Identifier: Apache-2.0
#
from sqlalchemy import Column
from sqlalchemy import DateTime
from sqlalchemy import ForeignKey
from sqlalchemy import Integer
from sqlalchemy import MetaData
from sqlalchemy import String
from sqlalchemy import Table
from sqlalch... | 227 | 0 | 23 |
fa1bb1adaf4391a9941c8819871b1a56b1b55821 | 6,157 | py | Python | src/explanation/Global/SurrogateModelExplanation.py | MauroLuzzatto/algorithmic-explanations | 4a362ae9576cc68ecf4b61dd6bad2105ff62bf57 | [
"Apache-2.0"
] | null | null | null | src/explanation/Global/SurrogateModelExplanation.py | MauroLuzzatto/algorithmic-explanations | 4a362ae9576cc68ecf4b61dd6bad2105ff62bf57 | [
"Apache-2.0"
] | null | null | null | src/explanation/Global/SurrogateModelExplanation.py | MauroLuzzatto/algorithmic-explanations | 4a362ae9576cc68ecf4b61dd6bad2105ff62bf57 | [
"Apache-2.0"
] | null | null | null | """
Created on Tue Nov 24 21:41:40 2020
@author: mauro
"""
import os
from typing import Dict
import graphviz
import pandas as pd
from sklearn.tree import DecisionTreeRegressor
from explanation.ExplanationBase import ExplanationBase
from explanation.Global.SurrogatePlot import SurrogatePlot
from explanation.Global.Su... | 30.939698 | 212 | 0.621407 | """
Created on Tue Nov 24 21:41:40 2020
@author: mauro
"""
import os
from typing import Dict
import graphviz
import pandas as pd
from sklearn.tree import DecisionTreeRegressor
from explanation.ExplanationBase import ExplanationBase
from explanation.Global.SurrogatePlot import SurrogatePlot
from explanation.Global.Su... | 1,806 | 0 | 27 |