hexsha stringlengths 40 40 | size int64 6 1.04M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 247 | max_stars_repo_name stringlengths 4 130 | 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 130 | 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 130 | 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.53 618k | max_line_length int64 1 1.02M | alphanum_fraction float64 0 1 | original_content stringlengths 6 1.04M | filtered:remove_non_ascii int64 0 538k | filtered:remove_decorators int64 0 917k | filtered:remove_async int64 0 722k | filtered:remove_classes int64 -45 1M | filtered:remove_generators int64 0 814k | filtered:remove_function_no_docstring int64 -102 850k | filtered:remove_class_no_docstring int64 -3 5.46k | filtered:remove_unused_imports int64 -1,350 52.4k | filtered:remove_delete_markers int64 0 59.6k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
9903ff1dd556a8dc9bf96c9260ccd0029845f009 | 4,704 | py | Python | utils.py | menpo/menpo-admin | 41cb5ab9aa56c3df26e7bfbf43a56a0cbd5f9674 | [
"BSD-3-Clause"
] | null | null | null | utils.py | menpo/menpo-admin | 41cb5ab9aa56c3df26e7bfbf43a56a0cbd5f9674 | [
"BSD-3-Clause"
] | 1 | 2017-01-24T11:17:03.000Z | 2017-01-24T11:17:03.000Z | utils.py | menpo/menpo-admin | 41cb5ab9aa56c3df26e7bfbf43a56a0cbd5f9674 | [
"BSD-3-Clause"
] | null | null | null | from functools import partial
from collections import namedtuple
Project = namedtuple('Project', ['name', 'versions'])
# all projects using condaci along with the Python version they
# need. Note that for non-python projects we can choose any single
# python version.
PROJECTS = [Project(*x) for x in
[('me... | 29.4 | 71 | 0.51892 | import os
import subprocess
from subprocess import CalledProcessError
from functools import partial
from collections import namedtuple
Project = namedtuple('Project', ['name', 'versions'])
# all projects using condaci along with the Python version they
# need. Note that for non-python projects we can choose any singl... | 0 | 0 | 0 | 0 | 221 | 1,511 | 0 | 4 | 300 |
51009389239cc5dc8055739ff5e46bb49c3c734e | 4,566 | py | Python | scripts/bench/4_latencybreakdown.py | sirikata/sirikata | 3a0d54a8c4778ad6e25ef031d461b2bc3e264860 | [
"BSD-3-Clause"
] | 31 | 2015-01-28T17:01:10.000Z | 2021-11-04T08:30:37.000Z | scripts/bench/4_latencybreakdown.py | pathorn/sirikata | 5d366a822ef2fb57cd9f64cc4f6085c0a635fdfa | [
"BSD-3-Clause"
] | null | null | null | scripts/bench/4_latencybreakdown.py | pathorn/sirikata | 5d366a822ef2fb57cd9f64cc4f6085c0a635fdfa | [
"BSD-3-Clause"
] | 9 | 2015-08-02T18:39:49.000Z | 2019-10-11T10:32:30.000Z | #!/usr/bin/python
# flow_fairness.py
#
# Runs a simulation with objects continually messaging each other.
# The analysis then generates statistics about the actual rates
# achieved and the weights. The output can be used to generate
# fairness graphs.
import sys
import subprocess
import os.path
# FIXME It would be ... | 31.489655 | 112 | 0.622646 | #!/usr/bin/python
# flow_fairness.py
#
# Runs a simulation with objects continually messaging each other.
# The analysis then generates statistics about the actual rates
# achieved and the weights. The output can be used to generate
# fairness graphs.
import sys
import subprocess
import os.path
# FIXME It would be ... | 0 | 0 | 0 | 1,071 | 0 | 0 | 0 | -1 | 22 |
733ac65472342a53c51bb203028ce20ee9757d52 | 3,537 | py | Python | python/sparkdl/transformers/keras_applications.py | alonsoir/spark-deep-learning | 3f668d9b4a0aa2ef6fe05df5bf5c1d705cd2530d | [
"Apache-2.0"
] | 54 | 2017-10-12T04:42:18.000Z | 2021-08-24T08:47:03.000Z | python/sparkdl/transformers/keras_applications.py | alonsoir/spark-deep-learning | 3f668d9b4a0aa2ef6fe05df5bf5c1d705cd2530d | [
"Apache-2.0"
] | null | null | null | python/sparkdl/transformers/keras_applications.py | alonsoir/spark-deep-learning | 3f668d9b4a0aa2ef6fe05df5bf5c1d705cd2530d | [
"Apache-2.0"
] | 17 | 2017-10-12T07:34:10.000Z | 2020-03-12T12:25:25.000Z | # Copyright 2017 Databricks, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writin... | 31.300885 | 91 | 0.685327 | # Copyright 2017 Databricks, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writin... | 0 | 270 | 0 | 1,898 | 0 | 248 | 0 | 119 | 204 |
006928383270000981141a2d160f55e1a9bc214b | 773 | py | Python | src/pyscripts/xsbs/plugins.py | harryd/xsbs-minimal | aaceaeda1d3fe6cdd7182484989eaa74e9ae9518 | [
"BSD-3-Clause"
] | 1 | 2018-05-22T13:42:47.000Z | 2018-05-22T13:42:47.000Z | src/pyscripts/xsbs/plugins.py | harryd/xsbs-minimal | aaceaeda1d3fe6cdd7182484989eaa74e9ae9518 | [
"BSD-3-Clause"
] | null | null | null | src/pyscripts/xsbs/plugins.py | harryd/xsbs-minimal | aaceaeda1d3fe6cdd7182484989eaa74e9ae9518 | [
"BSD-3-Clause"
] | null | null | null |
# Initialize these before loading plugins
import xsbs.db
import xsbs.events
import xsbs.log
import xsbs.ban
import xsbs.users
import xsbs.server
import xsbs.game
import xsbs.teamcontrol
import xsbs.persistteam
import xsbs.demo
import xsbs.http
main()
| 21.472222 | 113 | 0.756792 | from elixir import setup_all, create_all
import os, sys
# Initialize these before loading plugins
import xsbs.db
import xsbs.events
import xsbs.log
import xsbs.ban
import xsbs.users
import xsbs.server
import xsbs.game
import xsbs.teamcontrol
import xsbs.persistteam
import xsbs.demo
import xsbs.http
import xsbs.http.js... | 0 | 0 | 0 | 335 | 0 | 57 | 0 | 15 | 112 |
67ea6b4220213acf076591a0da456dbff315ee05 | 8,959 | py | Python | fuzzytorch/monitors.py | opimentel-github/fuzzy-torch | 4f1e06e6fc445cdec23e9762ca20408feeb296e3 | [
"MIT"
] | 1 | 2021-03-12T08:49:15.000Z | 2021-03-12T08:49:15.000Z | fuzzytorch/monitors.py | opimentel-github/fuzzy-torch | 4f1e06e6fc445cdec23e9762ca20408feeb296e3 | [
"MIT"
] | null | null | null | fuzzytorch/monitors.py | opimentel-github/fuzzy-torch | 4f1e06e6fc445cdec23e9762ca20408feeb296e3 | [
"MIT"
] | null | null | null | from __future__ import print_function
from __future__ import division
import torch.nn as nn
import fuzzytools.files as files
################################################################################################################################################### | 31.882562 | 147 | 0.724969 | from __future__ import print_function
from __future__ import division
from . import _C
import os
import torch.nn as nn
import numpy as np
from . import losses as ft_losses
from . import metrics as ft_metrics
from . import optimizers as ft_optimizers
from . import exceptions as ex
import fuzzytools.files as files
from ... | 0 | 0 | 0 | 8,288 | 0 | 0 | 0 | 110 | 288 |
9fca07bdb9a6dbdf43649b5340b88d177ac4d6ab | 7,256 | py | Python | leyline/tree_drawer.py | bentheiii/leyline | e9850b6f30a0aaa453ee1fcbd22fe6bf4c49ce0b | [
"MIT"
] | null | null | null | leyline/tree_drawer.py | bentheiii/leyline | e9850b6f30a0aaa453ee1fcbd22fe6bf4c49ce0b | [
"MIT"
] | null | null | null | leyline/tree_drawer.py | bentheiii/leyline | e9850b6f30a0aaa453ee1fcbd22fe6bf4c49ce0b | [
"MIT"
] | null | null | null | from typing import Optional
ColorName = Optional[str]
StyleName = Optional[str]
| 34.717703 | 114 | 0.570149 | from _ast import AST, Return, Expr, Str, Call, Attribute, Name, Yield, Raise
from abc import ABC
from ast import parse, iter_child_nodes
from functools import reduce
import inspect
from textwrap import dedent
from typing import Type, List, Tuple, Collection, Optional
import re
from leyline import Node
from leyline.gvi... | 0 | 2,363 | 0 | 4,384 | 0 | 0 | 0 | 132 | 291 |
3d55f92f4fbef80ed3856d2d699e6a8ff8285101 | 675 | py | Python | zip_function.py | sm1216/python | ccb78875dcb95cc18bf8d2a66896dedbb0fe7b41 | [
"MIT"
] | null | null | null | zip_function.py | sm1216/python | ccb78875dcb95cc18bf8d2a66896dedbb0fe7b41 | [
"MIT"
] | null | null | null | zip_function.py | sm1216/python | ccb78875dcb95cc18bf8d2a66896dedbb0fe7b41 | [
"MIT"
] | null | null | null | list1 =[1,2,3]
list2 =["one","two","three"]
zipped = list(zip(list1,list2))
print(zipped)
print("####################")
unzipped =list(zip(*zipped))
print(unzipped)
print("####################")
for (l1, l2) in zip(list1,list2):
print(l1)
print(l2)
print("####################")
items = [... | 21.09375 | 75 | 0.539259 | list1 =[1,2,3]
list2 =["one","two","three"]
zipped = list(zip(list1,list2))
print(zipped)
print("####################")
unzipped =list(zip(*zipped))
print(unzipped)
print("####################")
for (l1, l2) in zip(list1,list2):
print(l1)
print(l2)
print("####################")
items = [... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
3ba318c481e1408482608b403e889b6d462281f5 | 988 | py | Python | examples/bokeh_interactive_units.py | Narsil/chempy | ac7217f45a8cfe3b11ca771f78f0a04c07708818 | [
"BSD-2-Clause"
] | null | null | null | examples/bokeh_interactive_units.py | Narsil/chempy | ac7217f45a8cfe3b11ca771f78f0a04c07708818 | [
"BSD-2-Clause"
] | null | null | null | examples/bokeh_interactive_units.py | Narsil/chempy | ac7217f45a8cfe3b11ca771f78f0a04c07708818 | [
"BSD-2-Clause"
] | 1 | 2022-03-21T09:01:48.000Z | 2022-03-21T09:01:48.000Z | """
Interactive kinetics app with sliders (with units).
Start by runing:
$ bokeh serve interactive.py
Add --show argument or navigate to:
http://localhost:5006/interactive
"""
from collections import defaultdict
import sys
from chempy.util.bkh import integration_with_sliders
from chempy.units import SI_base_re... | 29.058824 | 84 | 0.672065 | """
Interactive kinetics app with sliders (with units).
Start by runing:
$ bokeh serve interactive.py
Add --show argument or navigate to:
http://localhost:5006/interactive
"""
from collections import defaultdict
import sys
from chempy.util.bkh import integration_with_sliders
from chempy.units import SI_base_re... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
fc603a336d6907b4650063f43483887c9a02976b | 4,693 | py | Python | renku/cli/_config.py | jirikuncar/renku-python | 69df9ea1d5db3c63fd2ea3537c7e46d079360c8f | [
"Apache-2.0"
] | 2 | 2019-03-09T17:56:57.000Z | 2019-07-03T15:20:22.000Z | renku/cli/_config.py | jirikuncar/renku-python | 69df9ea1d5db3c63fd2ea3537c7e46d079360c8f | [
"Apache-2.0"
] | null | null | null | renku/cli/_config.py | jirikuncar/renku-python | 69df9ea1d5db3c63fd2ea3537c7e46d079360c8f | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Copyright 2017 - Swiss Data Science Center (SDSC)
# A partnership between cole Polytechnique Fdrale de Lausanne (EPFL) and
# Eidgenssische Technische Hochschule Zrich (ETHZ).
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance ... | 29.149068 | 75 | 0.680162 | # -*- coding: utf-8 -*-
#
# Copyright 2017 - Swiss Data Science Center (SDSC)
# A partnership between École Polytechnique Fédérale de Lausanne (EPFL) and
# Eidgenössische Technische Hochschule Zürich (ETHZ).
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compli... | 10 | 998 | 0 | 0 | 0 | 0 | 0 | 0 | 27 |
a8139ae5acfd5b3b05d97a8c89429570e88de8c3 | 2,016 | py | Python | JaroEliCall/src/wrapped_interfaces/login_wrapped_ui.py | jaroslaw-wieczorek/Project_IP_Telephony_Python_Voip | 05143356fe91f745c286db8c3e2432714ab122e7 | [
"MIT"
] | null | null | null | JaroEliCall/src/wrapped_interfaces/login_wrapped_ui.py | jaroslaw-wieczorek/Project_IP_Telephony_Python_Voip | 05143356fe91f745c286db8c3e2432714ab122e7 | [
"MIT"
] | null | null | null | JaroEliCall/src/wrapped_interfaces/login_wrapped_ui.py | jaroslaw-wieczorek/Project_IP_Telephony_Python_Voip | 05143356fe91f745c286db8c3e2432714ab122e7 | [
"MIT"
] | 1 | 2018-03-20T21:22:40.000Z | 2018-03-20T21:22:40.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Wed May 30 18:49:11 2018
@author: afar
"""
import os
import sys
# importing data accc
lib_path = os.path.abspath(os.path.join(__file__, '..', '..', '..'))
sys.path.append(lib_path)
#from gui.testpic_ui import Ui_Dialog
| 25.518987 | 85 | 0.632937 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Wed May 30 18:49:11 2018
@author: afar
"""
import os
import sys
import hashlib
from PyQt5.QtWidgets import QDialog
from PyQt5.QtWidgets import QStatusBar
# importing data accc
lib_path = os.path.abspath(os.path.join(__file__, '..', '..', '..'))
sys.path.... | 0 | 0 | 0 | 1,506 | 0 | 0 | 0 | 72 | 135 |
2617cb2e73b14895dfae1fd3fe2018b9394d74fd | 825 | py | Python | monapay/management/commands/initaccounts.py | monapayjp/monapay | c896b104b5bea328d119f009710589ffd174386a | [
"BSD-3-Clause"
] | 4 | 2015-02-12T18:54:44.000Z | 2021-04-15T05:21:06.000Z | monapay/management/commands/initaccounts.py | monapayjp/monapay | c896b104b5bea328d119f009710589ffd174386a | [
"BSD-3-Clause"
] | 1 | 2018-02-03T17:35:36.000Z | 2018-02-03T17:35:36.000Z | monapay/management/commands/initaccounts.py | monapayjp/monapay | c896b104b5bea328d119f009710589ffd174386a | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
| 35.869565 | 72 | 0.646061 | # -*- coding: utf-8 -*-
from django.conf import settings
from django.core.management.base import BaseCommand, CommandError
from monapay.rpc import make_rpc_connection
class Command(BaseCommand):
def __init__(self, *args, **kwargs):
super(Command, self).__init__(*args, **kwargs)
def handle(self, *args... | 0 | 0 | 0 | 634 | 0 | 0 | 0 | 77 | 90 |
de7dbbbaf0bfc916c7c7f590fcfc3589933d6da2 | 163 | py | Python | data/typing/pandas.api.types.py | vfdev-5/python-record-api | 006faf0bba9cd4cb55fbacc13d2bbda365f5bf0b | [
"MIT"
] | 67 | 2020-08-17T11:53:26.000Z | 2021-11-08T20:16:06.000Z | data/typing/pandas.api.types.py | vfdev-5/python-record-api | 006faf0bba9cd4cb55fbacc13d2bbda365f5bf0b | [
"MIT"
] | 36 | 2020-08-17T11:09:51.000Z | 2021-12-15T18:09:47.000Z | data/typing/pandas.api.types.py | pydata-apis/python-api-record | 684cffbbb6dc6e81f9de4e02619c8b0ebc557b2b | [
"MIT"
] | 7 | 2020-08-19T05:06:47.000Z | 2020-11-04T05:10:38.000Z |
# usage.dask: 8
# usage.sklearn: 9
CategoricalDtype: object
# usage.dask: 2
is_categorical_dtype: object
# usage.dask: 3
is_sparse: object
| 13.583333 | 28 | 0.748466 | from typing import *
# usage.dask: 8
# usage.sklearn: 9
CategoricalDtype: object
# usage.dask: 2
is_categorical_dtype: object
# usage.dask: 3
is_sparse: object
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | -1 | 22 |
ac8e698132504eb73e69452ac813966d0ee22822 | 8,425 | py | Python | architect/orms/decorators.py | portcast/architect | 0cc6374d718855837ab3073b708c9765feb046cb | [
"Apache-2.0"
] | null | null | null | architect/orms/decorators.py | portcast/architect | 0cc6374d718855837ab3073b708c9765feb046cb | [
"Apache-2.0"
] | null | null | null | architect/orms/decorators.py | portcast/architect | 0cc6374d718855837ab3073b708c9765feb046cb | [
"Apache-2.0"
] | null | null | null | """
Defines decorators that Architect provides.
"""
| 41.502463 | 118 | 0.622077 | """
Defines decorators that Architect provides.
"""
import inspect
import functools
from .bases import BaseFeature
from .registry import registry, Registrar
from ..exceptions import (
ORMError,
FeatureInstallError,
FeatureUninstallError,
MethodAutoDecorateError
)
from copy import deepcopy
def set_li... | 0 | 0 | 0 | 7,746 | 0 | 299 | 0 | 122 | 203 |
9c1d726650bd473804e5a039a8c9a56480255dc6 | 1,144 | py | Python | Machine-Learning-A-Z-Udemy-master/Machine Learning A-Z Template Folder/Part 1 - Data Preprocessing/Mpython_working.py | CT83/Independent-Coursework | 5c7f93a7e05e64b13cb821f603efc54c92ad96c6 | [
"Apache-2.0"
] | null | null | null | Machine-Learning-A-Z-Udemy-master/Machine Learning A-Z Template Folder/Part 1 - Data Preprocessing/Mpython_working.py | CT83/Independent-Coursework | 5c7f93a7e05e64b13cb821f603efc54c92ad96c6 | [
"Apache-2.0"
] | null | null | null | Machine-Learning-A-Z-Udemy-master/Machine Learning A-Z Template Folder/Part 1 - Data Preprocessing/Mpython_working.py | CT83/Independent-Coursework | 5c7f93a7e05e64b13cb821f603efc54c92ad96c6 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Importing the Libraries
import pandas as pd
# Importing the Data
dataset=pd.read_csv('Data.csv')
X = dataset.iloc[:,:-1].values
y = dataset.iloc[:,3].values
# Taking care of missing Data
from sklearn.preprocessing import Imputer
imputer = Imputer(missing_values='NaN', strategy='mean', axis=... | 30.918919 | 92 | 0.768357 | # -*- coding: utf-8 -*-
# Importing the Libraries
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
# Importing the Data
dataset=pd.read_csv('Data.csv')
X = dataset.iloc[:,:-1].values
y = dataset.iloc[:,3].values
# Taking care of missing Data
from sklearn.preprocessing import Imputer
imputer = I... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 | 44 |
18411d6cbef85b0fa08f04f819e453cb8daf0028 | 13,542 | py | Python | tzdealer/tzdealer/report/customer_age/customer_age.py | Lewinta/tzdealer | 3e6a8f39e16029b217ae84bed806cb79bbc89dbf | [
"MIT"
] | null | null | null | tzdealer/tzdealer/report/customer_age/customer_age.py | Lewinta/tzdealer | 3e6a8f39e16029b217ae84bed806cb79bbc89dbf | [
"MIT"
] | null | null | null | tzdealer/tzdealer/report/customer_age/customer_age.py | Lewinta/tzdealer | 3e6a8f39e16029b217ae84bed806cb79bbc89dbf | [
"MIT"
] | null | null | null | # Copyright (c) 2013, TZCODE SRL and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
from frappe.utils import flt, date_diff, nowdate
def get_data(filters):
"""
Return the data that needs to be rendered
"""
fields = get_fields(filters)
conditio... | 30.431461 | 172 | 0.628563 | # Copyright (c) 2013, TZCODE SRL and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
from frappe import _
from frappe.utils import cstr, flt, date_diff, nowdate
def execute(filters=None):
return get_columns(filters), get_data(filters)
def get_colu... | 0 | 0 | 0 | 0 | 0 | 2,287 | 0 | 5 | 114 |
6469e5d0d5c80ef3183e5f71c4afdb4b3f3f36a4 | 934 | py | Python | setup.py | bertsky/ocrd_vandalize | 0cb84fb387d0145d386c2a425f20beee5d355b3d | [
"Apache-2.0"
] | 8 | 2021-12-15T14:45:11.000Z | 2022-02-09T16:51:20.000Z | setup.py | bertsky/ocrd_vandalize | 0cb84fb387d0145d386c2a425f20beee5d355b3d | [
"Apache-2.0"
] | 1 | 2022-01-14T10:58:27.000Z | 2022-01-14T10:58:27.000Z | setup.py | bertsky/ocrd_vandalize | 0cb84fb387d0145d386c2a425f20beee5d355b3d | [
"Apache-2.0"
] | 2 | 2022-01-14T11:06:54.000Z | 2022-01-21T14:54:10.000Z | # -*- coding: utf-8 -*-
import codecs
import json
from setuptools import setup, find_packages
#
with codecs.open('README.md', encoding='utf-8') as f:
README = f.read()
with open('./ocrd-tool.json', 'r') as f:
version = json.load(f)['version']
setup(
name='ocrd_vandalize',
version=version,
descri... | 26.685714 | 68 | 0.638116 | # -*- coding: utf-8 -*-
import codecs
import json
from setuptools import setup, find_packages
#
with codecs.open('README.md', encoding='utf-8') as f:
README = f.read()
with open('./ocrd-tool.json', 'r') as f:
version = json.load(f)['version']
setup(
name='ocrd_vandalize',
version=version,
descri... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
77f7cfaaa0a25a3602dcfef15eb55e962868b137 | 142 | py | Python | exercise/test4.py | LeeBeral/python | 9f0d360d69ee5245e3ef13a9dc9fc666374587a4 | [
"MIT"
] | null | null | null | exercise/test4.py | LeeBeral/python | 9f0d360d69ee5245e3ef13a9dc9fc666374587a4 | [
"MIT"
] | null | null | null | exercise/test4.py | LeeBeral/python | 9f0d360d69ee5245e3ef13a9dc9fc666374587a4 | [
"MIT"
] | null | null | null | dic = {'name':'lili','age':12}
print(dic)
del dic['name']
print(dic)
dic2 ={'name':'mam'}
print(dic2)
dic.update(dic2)
print(dic) | 12.909091 | 31 | 0.584507 | dic = {'name':'lili','age':12}
print(dic)
del dic['name']
print(dic)
dic2 ={'name':'mam'}
print(dic2)
dic.update(dic2)
print(dic) | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
e49d30b97a80af7ec73993c80fa023f88465b849 | 298 | py | Python | data/kids/nofz/delta_z_correlated_to_uncorrelated.py | KiDS-WL/Cat_to_Obs_K1000_P1 | 0de7f79cab150416859ffe58ac2d0f5659aedb5d | [
"MIT"
] | 7 | 2020-11-18T12:58:03.000Z | 2021-07-01T08:54:29.000Z | data/kids/nofz/delta_z_correlated_to_uncorrelated.py | KiDS-WL/Cat_to_Obs_K1000_P1 | 0de7f79cab150416859ffe58ac2d0f5659aedb5d | [
"MIT"
] | null | null | null | data/kids/nofz/delta_z_correlated_to_uncorrelated.py | KiDS-WL/Cat_to_Obs_K1000_P1 | 0de7f79cab150416859ffe58ac2d0f5659aedb5d | [
"MIT"
] | 3 | 2020-12-09T13:30:22.000Z | 2022-03-02T01:40:13.000Z | import numpy as np
filename='deltaz.asc'
file=open(filename)
delta_z=np.loadtxt(file,comments='#')
filename='SOM_cov_multiplied.asc'
file=open(filename)
cov_z=np.loadtxt(file,comments='#')
L = np.linalg.cholesky(cov_z)
inv_L = np.linalg.inv(L)
delta_x = np.dot(inv_L,delta_z)
print(delta_x) | 16.555556 | 37 | 0.744966 | import numpy as np
filename='deltaz.asc'
file=open(filename)
delta_z=np.loadtxt(file,comments='#')
filename='SOM_cov_multiplied.asc'
file=open(filename)
cov_z=np.loadtxt(file,comments='#')
L = np.linalg.cholesky(cov_z)
inv_L = np.linalg.inv(L)
delta_x = np.dot(inv_L,delta_z)
print(delta_x) | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
69d6b18ed07e94f12372de95034df57e7fe40895 | 12,986 | py | Python | Main/fase_1.py | DouglasAndC/GAME-COLORANDO-PYGAME | b96cc8df2dcfeb5e8a2ed0abb72c7dfb5bde2a00 | [
"MIT"
] | null | null | null | Main/fase_1.py | DouglasAndC/GAME-COLORANDO-PYGAME | b96cc8df2dcfeb5e8a2ed0abb72c7dfb5bde2a00 | [
"MIT"
] | null | null | null | Main/fase_1.py | DouglasAndC/GAME-COLORANDO-PYGAME | b96cc8df2dcfeb5e8a2ed0abb72c7dfb5bde2a00 | [
"MIT"
] | null | null | null | import pygame
import globals
import pygame as pg
pg.init()
# definindo cores
BLACK = (0, 0, 0)
WHITE = (255, 255, 255)
BLUE = (0, 0, 255)
GREEN = (0, 255, 0)
RED = (255, 0, 0)
ROXO = (127,0,127)
LARANJA = (255, 127, 0)
AMARELO = (255,255,0)
COR1 = (153, 0, 153)
PELE = (251, 230, 226)
CorSelecionada = (0, 255, 0)
glob... | 38.306785 | 110 | 0.495303 | import pygame
from pygame.locals import *
from pygame import *
import globals
import pygame as pg
from pygame.mixer import Sound
import time
pg.init()
# definindo cores
BLACK = (0, 0, 0)
WHITE = (255, 255, 255)
BLUE = (0, 0, 255)
GREEN = (0, 255, 0)
RED = (255, 0, 0)
ROXO = (127,0,127)
LARANJA = (255, 127, 0)
AMARELO... | 2 | 0 | 0 | 0 | 0 | 10,310 | 0 | -6 | 475 |
146fddc89ca4117d40b10362d56eec7e35ad4254 | 2,442 | py | Python | rescale_baseline_density.py | sjforeman/RadioFisher | fe25f969de9a700c5697168ba9e0d2645c55ed81 | [
"AFL-3.0"
] | 3 | 2020-12-05T11:28:47.000Z | 2021-07-09T02:42:21.000Z | rescale_baseline_density.py | sjforeman/RadioFisher | fe25f969de9a700c5697168ba9e0d2645c55ed81 | [
"AFL-3.0"
] | null | null | null | rescale_baseline_density.py | sjforeman/RadioFisher | fe25f969de9a700c5697168ba9e0d2645c55ed81 | [
"AFL-3.0"
] | 2 | 2021-07-09T02:42:23.000Z | 2021-11-30T06:37:47.000Z | #!/usr/bin/python
"""
Rescale baseline density files, Nring(u), into n(x) = n(u=d/lambda) / lambda^2,
which is approx. const. with frequency (and x = u / nu).
Phil Bull (2014)
"""
import numpy as np
import pylab as P
import scipy.integrate
import os, sys
try:
Ndish = int(sys.argv[1])
infile = sys.argv[2]
... | 30.148148 | 83 | 0.581081 | #!/usr/bin/python
"""
Rescale baseline density files, Nring(u), into n(x) = n(u=d/lambda) / lambda^2,
which is approx. const. with frequency (and x = u / nu).
Phil Bull (2014)
"""
import numpy as np
import pylab as P
import scipy.integrate
import os, sys
try:
Ndish = int(sys.argv[1])
infile = sys.argv[2]
... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
8adf03f135b35749475e53a47a588a4b9f8f0a62 | 1,275 | py | Python | lesson26.py | pingstech/Opencv_Examples2 | 05327af3dbf40e2b8e9f651c8154f45e018518e4 | [
"MIT"
] | 1 | 2021-09-05T13:14:19.000Z | 2021-09-05T13:14:19.000Z | lesson26.py | pingstech/Opencv_Examples2 | 05327af3dbf40e2b8e9f651c8154f45e018518e4 | [
"MIT"
] | null | null | null | lesson26.py | pingstech/Opencv_Examples2 | 05327af3dbf40e2b8e9f651c8154f45e018518e4 | [
"MIT"
] | null | null | null | import cv2
cap=cv2.VideoCapture(0)
ret,frame1=cap.read()
ret,frame2=cap.read()
print(cap.get(cv2.CAP_PROP_FRAME_WIDTH))
print(cap.get(cv2.CAP_PROP_FRAME_HEIGHT))
while (cap.isOpened()):
diff=cv2.absdiff(frame1,frame2)
diff=doContour(setFrame(diff),frame1)
cv2.imshow('Detection',frame1)
frame1=frame2
... | 30.357143 | 80 | 0.682353 | import cv2
def setFrame(frame):
grayFrame=cv2.cvtColor(frame,cv2.COLOR_BGR2GRAY)
blurFrame=cv2.GaussianBlur(grayFrame,(5,5),0)
_,threshFrame=cv2.threshold(blurFrame,20,255,cv2.THRESH_BINARY)
dilatedFrame=cv2.dilate(threshFrame,None,iterations=3)
return dilatedFrame
def doContour(frame,orgFrame,are... | 0 | 0 | 0 | 0 | 0 | 785 | 0 | 0 | 46 |
6a9b4be7df6137a1ebf46f6a4b6479a4ae5b8614 | 3,444 | py | Python | api/g6trayreturn.py | smu-iot20-g7/beocrescent-dashboard | 93776c7cba76e5c57fc2eed8c35584e7541557fe | [
"MIT"
] | null | null | null | api/g6trayreturn.py | smu-iot20-g7/beocrescent-dashboard | 93776c7cba76e5c57fc2eed8c35584e7541557fe | [
"MIT"
] | null | null | null | api/g6trayreturn.py | smu-iot20-g7/beocrescent-dashboard | 93776c7cba76e5c57fc2eed8c35584e7541557fe | [
"MIT"
] | 1 | 2020-12-05T06:48:25.000Z | 2020-12-05T06:48:25.000Z | from flask import Flask
import pymongo
from flask_cors import CORS
app = Flask(__name__)
client = pymongo.MongoClient(
"mongodb+srv://iotadmin:iotadminpassword@cluster0.cowqf.mongodb.net/iotTest?retryWrites=true&w=majority&ssl=true&ssl_cert_reqs=CERT_NONE")
CORS(app)
db = client['iotTest']
positivetrayreturn = d... | 33.764706 | 142 | 0.574042 | from flask import Flask, jsonify, request
import pymongo
from flask_cors import CORS
from os import environ
from bson.json_util import dumps
import json
app = Flask(__name__)
client = pymongo.MongoClient(
"mongodb+srv://iotadmin:iotadminpassword@cluster0.cowqf.mongodb.net/iotTest?retryWrites=true&w=majority&ssl=t... | 0 | 2,776 | 0 | 0 | 0 | 0 | 0 | 20 | 136 |
374f44188164e9d4772b1935cff59220da10b3cd | 4,782 | py | Python | calc.py | bryli/AKParser | ebecc471458b54a272134dc0f9b35f5da35a6257 | [
"MIT"
] | 1 | 2020-03-01T15:14:18.000Z | 2020-03-01T15:14:18.000Z | calc.py | bryli/AKParser | ebecc471458b54a272134dc0f9b35f5da35a6257 | [
"MIT"
] | null | null | null | calc.py | bryli/AKParser | ebecc471458b54a272134dc0f9b35f5da35a6257 | [
"MIT"
] | null | null | null |
ALLSKL = 'allSkillLvlup' # Key for character dictionary to get 2-7 level up mats
LVCOST = 'lvlUpCost'
MCOSTC = 'levelUpCostCond' # Key for mastery level cost upgrades.
MCOST = 'levelUpCost'
SKILLS = 'skills'
ELITE = 'phases'
PROMOTE = 'evolveCost'
RARE = 'rarity'
ID = 'id'
CT = 'count'
CHAR_LOC = "chardata.json"
FORMU... | 37.069767 | 114 | 0.604559 | import json
from collections import Counter
ALLSKL = 'allSkillLvlup' # Key for character dictionary to get 2-7 level up mats
LVCOST = 'lvlUpCost'
MCOSTC = 'levelUpCostCond' # Key for mastery level cost upgrades.
MCOST = 'levelUpCost'
SKILLS = 'skills'
ELITE = 'phases'
PROMOTE = 'evolveCost'
RARE = 'rarity'
ID = 'id'
C... | 0 | 0 | 0 | 0 | 0 | 4,108 | 0 | 0 | 182 |
dcb02e7452a985e2c94a463cfd5bbd8aea8b03f9 | 583 | py | Python | backend/__init__.py | allenai/twentyquestions | 48f0de26d2dca963cdae1263245d3b267ae7a771 | [
"Apache-2.0"
] | 9 | 2020-07-23T03:36:26.000Z | 2022-03-03T15:20:36.000Z | backend/__init__.py | allenai/twentyquestions | 48f0de26d2dca963cdae1263245d3b267ae7a771 | [
"Apache-2.0"
] | null | null | null | backend/__init__.py | allenai/twentyquestions | 48f0de26d2dca963cdae1263245d3b267ae7a771 | [
"Apache-2.0"
] | 2 | 2021-12-21T18:36:43.000Z | 2022-03-30T07:28:52.000Z | """A backend for playing twenty questions."""
import logging
import flask
from backend.views import (twentyquestions, socketio)
logger = logging.getLogger(__name__)
app = flask.Flask(__name__)
# register blueprints
app.register_blueprint(twentyquestions)
# set up the web socket
socketio.init_app(app)
| 16.657143 | 67 | 0.682676 | """A backend for playing twenty questions."""
import logging
import flask
from backend.views import (
twentyquestions,
socketio)
logger = logging.getLogger(__name__)
app = flask.Flask(__name__)
@app.route('/')
def root():
"""A root page for twentyquestions."""
return (
'This server is u... | 0 | 237 | 0 | 0 | 0 | 0 | 0 | 9 | 23 |
6f2ae1ff62c113ac8412a10c9d0e89f76b2b9b99 | 1,665 | py | Python | telegram_handler.py | anant-j/API-Toolkit | ced92c711fcb93f96b81a87e57bb4e5dd647224c | [
"CC0-1.0"
] | 1 | 2019-12-27T17:05:52.000Z | 2019-12-27T17:05:52.000Z | telegram_handler.py | anant-j/API-Toolkit | ced92c711fcb93f96b81a87e57bb4e5dd647224c | [
"CC0-1.0"
] | 2 | 2021-02-09T03:25:59.000Z | 2021-06-02T00:51:13.000Z | telegram_handler.py | anant-j/API-Toolkit | ced92c711fcb93f96b81a87e57bb4e5dd647224c | [
"CC0-1.0"
] | null | null | null | import json
import os
my_directory = os.path.dirname(os.path.abspath(__file__))
with open(f'{my_directory}/secrets/keys.json') as f:
api_keys = json.load(f)
TGKEY = api_keys["Telegram"]["Key"]
DEVID = api_keys["Telegram"]["DeviceID"]
def send_analytics(req, fingerprint):
"""Sends analytics data to Telegram A... | 36.195652 | 268 | 0.681081 | import json
import requests
import os
my_directory = os.path.dirname(os.path.abspath(__file__))
with open(f'{my_directory}/secrets/keys.json') as f:
api_keys = json.load(f)
TGKEY = api_keys["Telegram"]["Key"]
DEVID = api_keys["Telegram"]["DeviceID"]
def send_analytics(req, fingerprint):
"""Sends analytics da... | 0 | 0 | 0 | 0 | 0 | 109 | 0 | -6 | 45 |
c46beeec7b11c4abe6e2db62dfaeed8601291fe1 | 73,322 | py | Python | topobank/manager/views.py | ComputationalMechanics/TopoBank | 3e598d4b98cbffa43764e335f026efcbe7580c8a | [
"MIT"
] | 1 | 2020-06-04T23:18:53.000Z | 2020-06-04T23:18:53.000Z | topobank/manager/views.py | ComputationalMechanics/TopoBank | 3e598d4b98cbffa43764e335f026efcbe7580c8a | [
"MIT"
] | 168 | 2020-06-02T14:46:45.000Z | 2021-03-19T12:11:07.000Z | topobank/manager/views.py | ComputationalMechanics/TopoBank | 3e598d4b98cbffa43764e335f026efcbe7580c8a | [
"MIT"
] | null | null | null | import logging
import traceback
from io import BytesIO
from bokeh.embed import components
from django.core.exceptions import PermissionDenied
from django.http import HttpResponse, Http404
from django.shortcuts import render
from django.utils.decorators import method_decorator
from django.contrib.staticfiles.storage im... | 37.485685 | 122 | 0.610526 | import datetime
import logging
import os.path
import traceback
from io import BytesIO
import django_tables2 as tables
import numpy as np
from bokeh.embed import components
from bokeh.models import DataRange1d, LinearColorMapper, ColorBar, LabelSet, FuncTickFormatter, TapTool, OpenURL
from bokeh.plotting import figure... | 0 | 2,767 | 0 | 49,971 | 0 | 4,077 | 0 | 1,430 | 1,533 |
bbd02b18aafbd116aa8ea088f0e6678bdd955802 | 851 | py | Python | server/main.py | yuweiliandrew/openrtist | 4b6b17e77587751593d5e529b154e60513de3236 | [
"Apache-2.0"
] | null | null | null | server/main.py | yuweiliandrew/openrtist | 4b6b17e77587751593d5e529b154e60513de3236 | [
"Apache-2.0"
] | null | null | null | server/main.py | yuweiliandrew/openrtist | 4b6b17e77587751593d5e529b154e60513de3236 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
import logging
DEFAULT_PORT = 9099
DEFAULT_NUM_TOKENS = 2
INPUT_QUEUE_MAXSIZE = 60
logging.basicConfig(level=logging.INFO)
logger = logging.getLogger(__name__)
if __name__ == "__main__":
main()
| 25.029412 | 99 | 0.720329 | #!/usr/bin/env python3
from gabriel_server.network_engine import server_runner
import logging
import argparse
import importlib
DEFAULT_PORT = 9099
DEFAULT_NUM_TOKENS = 2
INPUT_QUEUE_MAXSIZE = 60
logging.basicConfig(level=logging.INFO)
logger = logging.getLogger(__name__)
def main():
parser = argparse.ArgumentP... | 0 | 0 | 0 | 0 | 0 | 512 | 0 | 23 | 90 |
4845208dc2008cff6748df7a14a9be766a0ca341 | 891 | py | Python | tests/models/product/product_relation_types/test_model.py | simonsobs/acondbs | 6ca11c2889d827ecdb2b54d0cf3b94b8cdd281e6 | [
"MIT"
] | null | null | null | tests/models/product/product_relation_types/test_model.py | simonsobs/acondbs | 6ca11c2889d827ecdb2b54d0cf3b94b8cdd281e6 | [
"MIT"
] | 24 | 2020-04-02T19:29:07.000Z | 2022-03-08T03:05:43.000Z | tests/models/product/product_relation_types/test_model.py | simonsobs/acondbs | 6ca11c2889d827ecdb2b54d0cf3b94b8cdd281e6 | [
"MIT"
] | 1 | 2020-04-08T15:48:28.000Z | 2020-04-08T15:48:28.000Z |
##__________________________________________________________________||
##__________________________________________________________________||
| 28.741935 | 74 | 0.65881 | from acondbs.db.sa import sa
from acondbs.models import ProductRelationType
##__________________________________________________________________||
def test_column(app_empty):
app = app_empty
with app.app_context():
model = ProductRelationType(
name="parent",
indef_article="a",... | 0 | 0 | 0 | 0 | 0 | 647 | 0 | 32 | 66 |
1c9ae6c11296e6a1e6f7c38c20040bce04faf76f | 2,330 | py | Python | examples/my_line_rules.py | l0nax/gitlint | df84afed929af588191aa93534842fab80e117dd | [
"MIT"
] | null | null | null | examples/my_line_rules.py | l0nax/gitlint | df84afed929af588191aa93534842fab80e117dd | [
"MIT"
] | null | null | null | examples/my_line_rules.py | l0nax/gitlint | df84afed929af588191aa93534842fab80e117dd | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Full details on user-defined rules: https://jorisroovers.com/gitlint/user_defined_rules
The SpecialChars class below is an example of a user-defined LineRule. Line rules are gitlint rules that only act on a
single line at once. Once the rule is discovered, gitlint will automatically take c... | 44.807692 | 118 | 0.704292 | # -*- coding: utf-8 -*-
from gitlint.rules import LineRule, RuleViolation, CommitMessageTitle
from gitlint.options import ListOption
"""
Full details on user-defined rules: https://jorisroovers.com/gitlint/user_defined_rules
The SpecialChars class below is an example of a user-defined LineRule. Line rules are gitlin... | 0 | 0 | 0 | 1,269 | 0 | 0 | 0 | 65 | 68 |
cd830753bb5761a968e2d3653e6ef40be79f29eb | 11,760 | py | Python | layers/densenet.py | IlikeBB/Object-Detection-for-M-NBI | 650fa1ca7b8860785f0a838dab0301a9cba121d6 | [
"MIT"
] | null | null | null | layers/densenet.py | IlikeBB/Object-Detection-for-M-NBI | 650fa1ca7b8860785f0a838dab0301a9cba121d6 | [
"MIT"
] | null | null | null | layers/densenet.py | IlikeBB/Object-Detection-for-M-NBI | 650fa1ca7b8860785f0a838dab0301a9cba121d6 | [
"MIT"
] | null | null | null | import torch.nn as nn
import torch.utils.model_zoo as model_zoo
__all__ = ['DenseNet', 'densenet50', 'densenet121', 'densenet169', 'densenet201', 'densenet161']
model_urls = {
'densenet121': 'https://download.pytorch.org/models/densenet121-a639ec97.pth',
'densenet169': 'https://download.pytorch.org/models/de... | 44.714829 | 192 | 0.63835 | import re
import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.utils.checkpoint as cp
from collections import OrderedDict
import torch.utils.model_zoo as model_zoo
__all__ = ['DenseNet', 'densenet50', 'densenet121', 'densenet169', 'densenet201', 'densenet161']
model_urls = {
'densenet1... | 0 | 0 | 0 | 7,210 | 0 | 486 | 0 | 17 | 225 |
87fdd5cc0a847ca325cf3cc9964514e6fe985f25 | 5,539 | py | Python | track/centroidtracker.py | yxtj/VideoServing | 52d1c1c97021f11cc4d77c181ac1144fe3a789ce | [
"MIT"
] | null | null | null | track/centroidtracker.py | yxtj/VideoServing | 52d1c1c97021f11cc4d77c181ac1144fe3a789ce | [
"MIT"
] | null | null | null | track/centroidtracker.py | yxtj/VideoServing | 52d1c1c97021f11cc4d77c181ac1144fe3a789ce | [
"MIT"
] | null | null | null | # modified from:
# https://www.pyimagesearch.com/2018/07/23/simple-object-tracking-with-opencv/
| 40.727941 | 78 | 0.608955 | # modified from:
# https://www.pyimagesearch.com/2018/07/23/simple-object-tracking-with-opencv/
from scipy.spatial import distance as dist
import numpy as np
class CentroidTracker():
def __init__(self, maxDisappeared=50):
# initialize the next unique object ID along with two ordered
# dictionaries ... | 0 | 0 | 0 | 5,341 | 0 | 0 | 0 | 18 | 67 |
5e9c4f1b493d16c09e4c154dee47c2a179feb368 | 2,371 | py | Python | trader/messaging/bus.py | 9600dev/mmr | b08e63b7044f2b2061d8679b216822c82d309c86 | [
"Apache-2.0"
] | 12 | 2021-09-22T21:19:23.000Z | 2022-01-03T21:38:47.000Z | trader/messaging/bus.py | 9600dev/mmr | b08e63b7044f2b2061d8679b216822c82d309c86 | [
"Apache-2.0"
] | null | null | null | trader/messaging/bus.py | 9600dev/mmr | b08e63b7044f2b2061d8679b216822c82d309c86 | [
"Apache-2.0"
] | 3 | 2021-09-05T23:26:13.000Z | 2022-03-25T01:01:22.000Z | import lightbus
from trader.container import Container
bus = lightbus.create(config_file=Container().config()['lightbus_config_file'])
bus.client.register_api(TraderServiceApi())
| 38.241935 | 101 | 0.716997 | import lightbus
from lightbus.api import Api, Event
from dataclasses import dataclass
from ib_insync.objects import Position, PortfolioItem
from ib_insync.contract import Contract
from ib_insync.order import Order, Trade
from trader.container import Container
from trader.trading.trading_runtime import Action, Trader
fr... | 0 | 0 | 1,012 | 758 | 0 | 0 | 0 | 199 | 222 |
3bf7e94c85fcc3d67cebd0e19a84bfc00aa8605f | 13,001 | py | Python | bs_align/bs_align_utils.py | huboqiang/BSseeker2 | 385f88cf78b3efced75798c00f0e7185ac064047 | [
"MIT"
] | null | null | null | bs_align/bs_align_utils.py | huboqiang/BSseeker2 | 385f88cf78b3efced75798c00f0e7185ac064047 | [
"MIT"
] | null | null | null | bs_align/bs_align_utils.py | huboqiang/BSseeker2 | 385f88cf78b3efced75798c00f0e7185ac064047 | [
"MIT"
] | 1 | 2021-11-01T03:21:47.000Z | 2021-11-01T03:21:47.000Z |
BAM_MATCH = 0
BAM_INS = 1
BAM_DEL = 2
BAM_SOFTCLIP = 4
CIGAR_OPS = {'M' : BAM_MATCH, 'I' : BAM_INS, 'D' : BAM_DEL, 'S' : BAM_SOFTCLIP}
#----------------------------------------------------------------
"""
Exmaple:
========
Read : ACCGCGTTGATCGAGTACGTACGTGGGTC
Adapter : ....................ACGTGGGTCCCG
=... | 32.748111 | 133 | 0.515576 | from bs_utils.utils import *
import re
BAM_MATCH = 0
BAM_INS = 1
BAM_DEL = 2
BAM_SOFTCLIP = 4
CIGAR_OPS = {'M' : BAM_MATCH, 'I' : BAM_INS, 'D' : BAM_DEL, 'S' : BAM_SOFTCLIP}
def N_MIS(r,g):
mismatches = 0
if len(r)==len(g):
for i in xrange(len(r)):
if r[i] != g[i] and r[i] != "N" and g[... | 0 | 0 | 0 | 0 | 5,639 | 5,088 | 0 | -5 | 249 |
c3579c902cbdded2585c8b7a27020a60e348e6c2 | 160 | py | Python | scripts/portal/evantalk02.py | G00dBye/YYMS | 1de816fc842b6598d5b4b7896b6ab0ee8f7cdcfb | [
"MIT"
] | 54 | 2019-04-16T23:24:48.000Z | 2021-12-18T11:41:50.000Z | scripts/portal/evantalk02.py | G00dBye/YYMS | 1de816fc842b6598d5b4b7896b6ab0ee8f7cdcfb | [
"MIT"
] | 3 | 2019-05-19T15:19:41.000Z | 2020-04-27T16:29:16.000Z | scripts/portal/evantalk02.py | G00dBye/YYMS | 1de816fc842b6598d5b4b7896b6ab0ee8f7cdcfb | [
"MIT"
] | 49 | 2020-11-25T23:29:16.000Z | 2022-03-26T16:20:24.000Z | if not "mo02=o" in sm.getQRValue(22013):
sm.avatarOriented("Effect/OnUserEff.img/guideEffect/evanTutorial/evanBalloon02")
sm.addQRValue(22013, "mo02=o") | 53.333333 | 84 | 0.75625 | if not "mo02=o" in sm.getQRValue(22013):
sm.avatarOriented("Effect/OnUserEff.img/guideEffect/evanTutorial/evanBalloon02")
sm.addQRValue(22013, "mo02=o") | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
e5d4fa5bda36ea06fdffa442436c6a00ebf6be36 | 165 | py | Python | gravis/_internal/plotting/__init__.py | robert-haas/gravis | 3e63b606141bf78617b1247048a9e3ccca6d5824 | [
"Apache-2.0"
] | 3 | 2022-01-19T15:57:29.000Z | 2022-03-06T02:36:44.000Z | gravis/_internal/plotting/__init__.py | robert-haas/gravis | 3e63b606141bf78617b1247048a9e3ccca6d5824 | [
"Apache-2.0"
] | 2 | 2022-03-01T19:29:49.000Z | 2022-03-01T19:31:08.000Z | gravis/_internal/plotting/__init__.py | robert-haas/gravis | 3e63b606141bf78617b1247048a9e3ccca6d5824 | [
"Apache-2.0"
] | null | null | null | """A subpackage containing plotting functions."""
__all__ = [
'd3',
'three',
'vis',
]
from .d3 import d3
from .three import three
from .vis import vis
| 13.75 | 49 | 0.636364 | """A subpackage containing plotting functions."""
__all__ = [
'd3',
'three',
'vis',
]
from .d3 import d3
from .three import three
from .vis import vis
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
b74a21a3a4baee8e1ace1d4298da7847fa61cc93 | 68 | py | Python | src/obfuscapk/obfuscators/random_manifest/__init__.py | Elyorbe/Obfuscapk | 2ba18df4b5efe44b4fab271ab5ccfe51488fa693 | [
"MIT"
] | 688 | 2019-08-23T16:43:10.000Z | 2022-03-29T19:35:07.000Z | src/obfuscapk/obfuscators/random_manifest/__init__.py | Ktm2590/Obfuscapk | 4072b6dea88e91b75064a84c7d3adebe005e8207 | [
"MIT"
] | 124 | 2019-09-07T13:10:59.000Z | 2022-03-17T16:47:29.000Z | src/obfuscapk/obfuscators/random_manifest/__init__.py | Ktm2590/Obfuscapk | 4072b6dea88e91b75064a84c7d3adebe005e8207 | [
"MIT"
] | 204 | 2019-08-23T14:43:52.000Z | 2022-03-30T21:04:50.000Z | #!/usr/bin/env python3
| 17 | 43 | 0.808824 | #!/usr/bin/env python3
from .random_manifest import RandomManifest
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 22 | 23 |
7fc69e8d42affa4c0554d5794c970f2092f0c828 | 2,152 | py | Python | subtest/test_coal_mine.py | RuneSkovrupHansen/python-testing | 318d082d1100877dea93cabca1c727199bc6416e | [
"MIT"
] | null | null | null | subtest/test_coal_mine.py | RuneSkovrupHansen/python-testing | 318d082d1100877dea93cabca1c727199bc6416e | [
"MIT"
] | null | null | null | subtest/test_coal_mine.py | RuneSkovrupHansen/python-testing | 318d082d1100877dea93cabca1c727199bc6416e | [
"MIT"
] | null | null | null | #!/bin/bash
if __name__ == "__main__":
main() | 37.103448 | 95 | 0.640335 | #!/bin/bash
from mimetypes import init
import unittest
import coal_mine
class TestCoalMine(unittest.TestCase):
def setUp(self):
self.cm = coal_mine.CoalMine()
# Test that worker property sets values in range correctly
def test_workers_in_range(self):
for workers in range(self.cm.WORK... | 0 | 0 | 0 | 1,977 | 0 | 10 | 0 | -6 | 121 |
c2a7b745461abcec5d3d58cd180c360982e7bdb3 | 19,014 | py | Python | testing/scripts/test_rolling_updates.py | pravingadakh/seldon-core | a72257fa851033ee09513a0b6b310087eb625e85 | [
"Apache-2.0"
] | null | null | null | testing/scripts/test_rolling_updates.py | pravingadakh/seldon-core | a72257fa851033ee09513a0b6b310087eb625e85 | [
"Apache-2.0"
] | null | null | null | testing/scripts/test_rolling_updates.py | pravingadakh/seldon-core | a72257fa851033ee09513a0b6b310087eb625e85 | [
"Apache-2.0"
] | null | null | null | import pytest
from seldon_e2e_utils import (API_AMBASSADOR, API_ISTIO_GATEWAY)
with_api_gateways = pytest.mark.parametrize(
"api_gateway", [API_AMBASSADOR, API_ISTIO_GATEWAY], ids=["ambas", "istio"]
)
| 47.181141 | 88 | 0.591143 | import os
import time
import logging
import pytest
from subprocess import run
from seldon_e2e_utils import (
wait_for_status,
wait_for_rollout,
rest_request_ambassador,
initial_rest_request,
retry_run,
API_AMBASSADOR,
API_ISTIO_GATEWAY,
)
def to_resources_path(file_name):
return os.pat... | 0 | 18,203 | 0 | 9 | 0 | 66 | 0 | 100 | 426 |
4ce4e405b09d9027494a202ab8deb07dfb728805 | 1,078 | py | Python | ingenico/connect/sdk/domain/mandates/definitions/create_mandate_with_return_url.py | festicket/connect-sdk-python3 | c399c6443789dd978f319c89e1ebd387c812a77b | [
"MIT"
] | 12 | 2016-09-26T21:46:31.000Z | 2020-12-23T18:44:54.000Z | ingenico/connect/sdk/domain/mandates/definitions/create_mandate_with_return_url.py | festicket/connect-sdk-python3 | c399c6443789dd978f319c89e1ebd387c812a77b | [
"MIT"
] | 3 | 2020-05-02T16:53:02.000Z | 2020-06-02T12:49:51.000Z | ingenico/connect/sdk/domain/mandates/definitions/create_mandate_with_return_url.py | festicket/connect-sdk-python3 | c399c6443789dd978f319c89e1ebd387c812a77b | [
"MIT"
] | 11 | 2017-07-16T00:55:28.000Z | 2021-09-24T17:00:49.000Z | # -*- coding: utf-8 -*-
#
# This class was auto-generated from the API references found at
# https://epayments-api.developer-ingenico.com/s2sapi/v1/
#
| 29.135135 | 98 | 0.681818 | # -*- coding: utf-8 -*-
#
# This class was auto-generated from the API references found at
# https://epayments-api.developer-ingenico.com/s2sapi/v1/
#
from ingenico.connect.sdk.domain.mandates.definitions.create_mandate_base import CreateMandateBase
class CreateMandateWithReturnUrl(CreateMandateBase):
__return_u... | 0 | 235 | 0 | 569 | 0 | 0 | 0 | 77 | 45 |
68a2657034c704483c93720e0fd358d8d19b0d25 | 13,534 | py | Python | VIGA_METALICA_VERIFICA - Copy.py | wmpjrufg/RASD-ALGORITMOS | 1bdc2c4271c8019733c34333e5e91b70bc3c7604 | [
"MIT"
] | null | null | null | VIGA_METALICA_VERIFICA - Copy.py | wmpjrufg/RASD-ALGORITMOS | 1bdc2c4271c8019733c34333e5e91b70bc3c7604 | [
"MIT"
] | null | null | null | VIGA_METALICA_VERIFICA - Copy.py | wmpjrufg/RASD-ALGORITMOS | 1bdc2c4271c8019733c34333e5e91b70bc3c7604 | [
"MIT"
] | null | null | null | ################################################################################
# UNIVERSIDADE FEDERAL DE CATALO (UFCAT)
# WANDERLEI MALAQUIAS PEREIRA JUNIOR, ENG. CIVIL / PROF (UFCAT)
# DONIZETTI SOUZA JUNIOR, ENG. CIVIL (UFCAT)
####################################... | 36.479784 | 115 | 0.504064 | ################################################################################
# UNIVERSIDADE FEDERAL DE CATALÃO (UFCAT)
# WANDERLEI MALAQUIAS PEREIRA JUNIOR, ENG. CIVIL / PROF (UFCAT)
# DONIZETTI SOUZA JUNIOR, ENG. CIVIL (UFCAT)
###################################... | 264 | 0 | 0 | 0 | 0 | 1,056 | 0 | 0 | 46 |
368b9cd21ed0d5c389fc6e20d0fcc7a3b567992b | 1,671 | py | Python | main.py | unpamplemoussemignon/e314-music-visualization | 38fe1f97bfd35751867a51af330148f65b6f21bf | [
"CC0-1.0"
] | null | null | null | main.py | unpamplemoussemignon/e314-music-visualization | 38fe1f97bfd35751867a51af330148f65b6f21bf | [
"CC0-1.0"
] | null | null | null | main.py | unpamplemoussemignon/e314-music-visualization | 38fe1f97bfd35751867a51af330148f65b6f21bf | [
"CC0-1.0"
] | null | null | null | #!/usr/bin/env python
# =================================
# Music Visualizer
# ------------
# Reference to -> [May 2020] - Mina PECHEUX
#
# Based on the work by Yu-Jie Lin
# (Public Domain)
# Github: https://gist.github.com/manugarri/1c0fcfe9619b775bb82de0790ccb88da
if __name__ == '__main__':
main()
| 32.764706 | 112 | 0.653501 | #!/usr/bin/env python
# =================================
# Music Visualizer
# ------------
# Reference to -> [May 2020] - Mina PECHEUX
#
# Based on the work by Yu-Jie Lin
# (Public Domain)
# Github: https://gist.github.com/manugarri/1c0fcfe9619b775bb82de0790ccb88da
import wave
import click
from compute import plt, c... | 0 | 1,232 | 0 | 0 | 0 | 0 | 0 | 44 | 91 |
df2176e417c138b40a9dee3721b7d6cc7dbf0916 | 1,663 | py | Python | gerar_inscricaoestadual.py | andrellmagalhaes/Open-development | 718fb1815fbd6dd194f1ec2049f56aa2a533b88e | [
"MIT"
] | 1 | 2021-09-13T00:55:08.000Z | 2021-09-13T00:55:08.000Z | gerar_inscricaoestadual.py | andrellmagalhaes/Open-development | 718fb1815fbd6dd194f1ec2049f56aa2a533b88e | [
"MIT"
] | null | null | null | gerar_inscricaoestadual.py | andrellmagalhaes/Open-development | 718fb1815fbd6dd194f1ec2049f56aa2a533b88e | [
"MIT"
] | null | null | null | # IMPORTAES
# FUNO QUE GERA NMEROS DE INSCRIO ESTADUAL
| 31.980769 | 79 | 0.629585 | # IMPORTAÇÕES
import random
import string
# FUNÇÃO QUE GERA NÚMEROS DE INSCRIÇÃO ESTADUAL
def gerar_inscricaoestadual(quantidade=1, tamanho=9):
# VERIFICA SE "QUANTIDADE" OU "TAMANHO" NÃO SÃO DO TIPO INTEIRO
if not type(quantidade) == int or not type(tamanho) == int:
raise TypeError("Os par... | 64 | 0 | 0 | 0 | 0 | 1,517 | 0 | -16 | 69 |
55d1d3e1e8c91e15987eee3a0c33503376cce60d | 9,287 | py | Python | pygame_project/split_balloon/split_balloon_game.py | bbjoite09/PythonProject | f0ab7a4e6b23758612012ebf7989029e88edf204 | [
"MIT"
] | 1 | 2021-04-29T08:18:50.000Z | 2021-04-29T08:18:50.000Z | pygame_project/split_balloon/split_balloon_game.py | bbjoite09/PythonProject | f0ab7a4e6b23758612012ebf7989029e88edf204 | [
"MIT"
] | 1 | 2021-05-23T16:05:29.000Z | 2021-05-23T16:05:29.000Z | pygame_project/split_balloon/split_balloon_game.py | bbjoite09/PythonProject | f0ab7a4e6b23758612012ebf7989029e88edf204 | [
"MIT"
] | null | null | null | '''
pang
[ ]
1. ,
2.
3. 1
4. 2 ,
5. ()
6. ()
7. 99 ()
8. FPS 30 ( speed )
[ ]
1. : 640 * 480(, ) - background.png
2. : 640 * 50 - stage.png
3. : 33 * 60 - character.png
4. : 20 * 430 weapon.png
5. : 160 * 160, 80 * 80, 40 * 40, 20 * 20 - ball1.png ~ ball4/png
'''
import o... | 31.588435 | 110 | 0.604824 | '''
오락실 pang 게임 만들기
[게임 조건]
1. 캐릭터는 화면 아래에 위치, 좌우로만 이동 가능
2. 스페이스를 누르면 무기를 쏘아 올림
3. 큰 공 1개가 나타나서 바운스
4. 무기에 닿으면 공은 작은 크기 2개로 분할, 가장 작은 크기의 공은 사라짐
5. 모든 공을 없애면 게임 종료(성공)
6. 캐릭터는 공에 닿으면 게임 종료(실패)
7. 시간 제한 99초 초과시 게임 종료(실패)
8. FPS는 30으로 고정(필요시 speed 값을 조정)
[게임 이미지]
1. 배경 : 640 * 480(가로, 세로) - background.png
2. 무대 : 640 ... | 2,013 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
6738ee449dfe6c373584329dd36f71a082590223 | 1,845 | py | Python | src/roadlr/vgg_post.py | deepguider/RoadGPS | 7db4669a54da98a854886b89b6922fb8c7a60f33 | [
"Apache-2.0",
"BSD-3-Clause"
] | 2 | 2019-05-22T12:47:34.000Z | 2019-05-23T15:43:47.000Z | src/roadlr/vgg_post.py | deepguider/RoadGPS | 7db4669a54da98a854886b89b6922fb8c7a60f33 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | src/roadlr/vgg_post.py | deepguider/RoadGPS | 7db4669a54da98a854886b89b6922fb8c7a60f33 | [
"Apache-2.0",
"BSD-3-Clause"
] | 1 | 2019-08-09T06:50:46.000Z | 2019-08-09T06:50:46.000Z | '''VGG11/13/16/19 in Pytorch.'''
import torch.nn as nn
import torchvision.models as models
cfg = {
'VGG16_POST': [512, 512, 'M']
}
| 38.4375 | 118 | 0.552304 | '''VGG11/13/16/19 in Pytorch.'''
import torch
import torch.nn as nn
import torchvision.models as models
import torch.nn.functional as F
from ipdb import set_trace as bp
cfg = {
'VGG16_POST': [512, 512, 'M']
}
class VGG_POST(nn.Module):
def __init__(self, height, width):
super(VGG_POST, self).__init__... | 0 | 0 | 0 | 1,607 | 0 | 0 | 0 | 12 | 90 |
817c9d802649e5563674be39ac0c3499f6cde805 | 4,358 | py | Python | orio-0.1.0/src/main/tuner/search/exhaustive/exhaustive.py | nn4ip/pluto | 92ace2441b6b8d6b66d1bb7ef3e893df4ff23a4d | [
"MIT"
] | 183 | 2017-01-28T17:23:29.000Z | 2022-03-25T08:58:56.000Z | orio-0.1.0/src/main/tuner/search/exhaustive/exhaustive.py | nn4ip/pluto | 92ace2441b6b8d6b66d1bb7ef3e893df4ff23a4d | [
"MIT"
] | 70 | 2017-03-29T09:51:04.000Z | 2021-12-28T07:00:44.000Z | orio-0.1.0/src/main/tuner/search/exhaustive/exhaustive.py | nn4ip/pluto | 92ace2441b6b8d6b66d1bb7ef3e893df4ff23a4d | [
"MIT"
] | 57 | 2017-03-29T07:27:58.000Z | 2022-01-14T03:13:39.000Z | #
# Implementation of the exhaustive search algorithm
#
#-----------------------------------------------------
| 36.621849 | 101 | 0.544516 | #
# Implementation of the exhaustive search algorithm
#
import sys, time
import main.tuner.search.search
#-----------------------------------------------------
class Exhaustive(main.tuner.search.search.Search):
'''The search engine that uses an exhaustive search approach'''
def __init__(self, cfrags, axis_... | 0 | 0 | 0 | 4,158 | 0 | 0 | 0 | 5 | 68 |
f2dc1850d674cc25fd856fe2c9f15426cb04a079 | 1,010 | py | Python | app.py | Manasi2001/Smart-Irrigation-System | 9de4b44256e6f998f7dde0c721ce34bf0000f360 | [
"MIT"
] | null | null | null | app.py | Manasi2001/Smart-Irrigation-System | 9de4b44256e6f998f7dde0c721ce34bf0000f360 | [
"MIT"
] | null | null | null | app.py | Manasi2001/Smart-Irrigation-System | 9de4b44256e6f998f7dde0c721ce34bf0000f360 | [
"MIT"
] | null | null | null | import os
import joblib
classifier = joblib.load(r'smartirrigation.pkl')
# importing Flask and other modules
from flask import Flask
# Flask constructor
app = Flask(__name__)
# A decorator used to tell the application
# which URL is associated function
if __name__=='__main__':
port = int(... | 31.5625 | 67 | 0.622772 | import os
import joblib
classifier = joblib.load(r'smartirrigation.pkl')
# importing Flask and other modules
from flask import Flask, request, render_template
import numpy as np
# Flask constructor
app = Flask(__name__)
# A decorator used to tell the application
# which URL is associated function... | 0 | 551 | 0 | 0 | 0 | 0 | 0 | 23 | 46 |
4f076ea07d8ac8daa548c2e9e7e0dff9a07548bd | 4,761 | py | Python | bebotPlatform/settings.py | ElitosGon/bebotPlatform | f10b37ecc6cc748a719efc639faa9a2907357682 | [
"Apache-2.0"
] | null | null | null | bebotPlatform/settings.py | ElitosGon/bebotPlatform | f10b37ecc6cc748a719efc639faa9a2907357682 | [
"Apache-2.0"
] | 6 | 2020-06-05T17:08:29.000Z | 2022-03-11T23:14:15.000Z | bebotPlatform/settings.py | ElitosGon/bebotPlatform | f10b37ecc6cc748a719efc639faa9a2907357682 | [
"Apache-2.0"
] | null | null | null | """
Django settings for bebotPlatform project.
Generated by 'django-admin startproject' using Django 2.0.1.
For more information on this file, see
https://docs.djangoproject.com/en/2.0/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.0/ref/settings/
"""
from dj... | 26.45 | 118 | 0.705944 | """
Django settings for bebotPlatform project.
Generated by 'django-admin startproject' using Django 2.0.1.
For more information on this file, see
https://docs.djangoproject.com/en/2.0/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.0/ref/settings/
"""
from dj... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 24 | 22 |
e19efff62172edb798c2b0bad7a319dbf88a5318 | 3,862 | py | Python | flowsa/Census_CBP.py | cchiq/flowsa | fc21e8da7c3ba66ca4ae4a0c72f568af7ef5e6c0 | [
"CC0-1.0"
] | null | null | null | flowsa/Census_CBP.py | cchiq/flowsa | fc21e8da7c3ba66ca4ae4a0c72f568af7ef5e6c0 | [
"CC0-1.0"
] | null | null | null | flowsa/Census_CBP.py | cchiq/flowsa | fc21e8da7c3ba66ca4ae4a0c72f568af7ef5e6c0 | [
"CC0-1.0"
] | null | null | null | # Census_CBP.py (flowsa)
# !/usr/bin/env python3
# coding=utf-8
"""
Pulls County Business Patterns data in NAICS from the Census Bureau
Writes out to various FlowBySector class files for these data items
EMP = Number of employees, Class = Employment
PAYANN = Annual payroll ($1,000), Class = Money
ESTAB = Number of esta... | 38.62 | 86 | 0.631538 | # Census_CBP.py (flowsa)
# !/usr/bin/env python3
# coding=utf-8
"""
Pulls County Business Patterns data in NAICS from the Census Bureau
Writes out to various FlowBySector class files for these data items
EMP = Number of employees, Class = Employment
PAYANN = Annual payroll ($1,000), Class = Money
ESTAB = Number of esta... | 0 | 0 | 0 | 0 | 0 | 3,124 | 0 | 50 | 158 |
5dcd64d4cbce7570663b74758a9b37abc2510d4e | 1,363 | py | Python | packages/pyright-internal/src/tests/samples/variadicTypeVar2.py | sasano8/pyright | e804f324ee5dbd25fd37a258791b3fd944addecd | [
"MIT"
] | 4,391 | 2019-05-07T01:18:57.000Z | 2022-03-31T20:45:44.000Z | packages/pyright-internal/src/tests/samples/variadicTypeVar2.py | sasano8/pyright | e804f324ee5dbd25fd37a258791b3fd944addecd | [
"MIT"
] | 2,740 | 2019-05-07T03:29:30.000Z | 2022-03-31T12:57:46.000Z | packages/pyright-internal/src/tests/samples/variadicTypeVar2.py | sasano8/pyright | e804f324ee5dbd25fd37a258791b3fd944addecd | [
"MIT"
] | 455 | 2019-05-07T12:55:14.000Z | 2022-03-31T17:09:15.000Z | # This sample tests various conditions under which Unpack
# can and cannot be used.
# pyright: reportMissingModuleSource=false
from typing import List, TypeVar
from typing_extensions import TypeVarTuple, Unpack
_T = TypeVar("_T")
_Xs = TypeVarTuple("_Xs")
# This should generate an error.
x: List[Unpack[_Xs]] = [... | 21.296875 | 63 | 0.62876 | # This sample tests various conditions under which Unpack
# can and cannot be used.
# pyright: reportMissingModuleSource=false
from typing import Generic, List, Tuple, TypeVar, Union
from typing_extensions import TypeVarTuple, Unpack
_T = TypeVar("_T")
_Xs = TypeVarTuple("_Xs")
class ClassA(Generic[_T, Unpack[_Xs... | 0 | 0 | 0 | 662 | 0 | 44 | 0 | 23 | 68 |
b3129c41be6df0f67c689237bce862f41d0f6489 | 12,097 | py | Python | dockeroo/docker/gentoo_bootstrap.py | dockeroo/dockeroo | 6395b4008d0d3d6cabdfec9d52ce448b095fdae1 | [
"Apache-2.0"
] | 4 | 2016-07-25T09:21:32.000Z | 2022-02-11T19:11:23.000Z | dockeroo/docker/gentoo_bootstrap.py | dockeroo/dockeroo | 6395b4008d0d3d6cabdfec9d52ce448b095fdae1 | [
"Apache-2.0"
] | null | null | null | dockeroo/docker/gentoo_bootstrap.py | dockeroo/dockeroo | 6395b4008d0d3d6cabdfec9d52ce448b095fdae1 | [
"Apache-2.0"
] | null | null | null |
# -*- coding: utf-8 -*-
#
# Copyright (c) 2016, Giacomo Cariello. 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
#
# Un... | 42.745583 | 182 | 0.630322 |
# -*- coding: utf-8 -*-
#
# Copyright (c) 2016, Giacomo Cariello. 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
#
# Un... | 0 | 0 | 0 | 11,237 | 0 | 0 | 0 | 89 | 136 |
bc5473086318e86d614755dbb30522dfe789f2a8 | 10,298 | py | Python | Apollo.py | heitorsampaio/ApolloAI | c2983ce51c52641453fb1f6e0d7598bdd47ed66d | [
"MIT"
] | null | null | null | Apollo.py | heitorsampaio/ApolloAI | c2983ce51c52641453fb1f6e0d7598bdd47ed66d | [
"MIT"
] | null | null | null | Apollo.py | heitorsampaio/ApolloAI | c2983ce51c52641453fb1f6e0d7598bdd47ed66d | [
"MIT"
] | null | null | null | #!/usr/bin python3
#importing stuffs
from yeelight import Bulb
from ibm_watson import TextToSpeechV1
bulb = Bulb('192.168.15.2')
interrupted = False
text_to_speech = TextToSpeechV1(
iam_apikey='9mDYXRnjmXZS5grZPaBVleJarFajeVEn-Mjp9m_sWFSm',
url='https://stream.watsonplatform.net/text-to-speech/api'
)
test... | 32.588608 | 158 | 0.578171 | #!/usr/bin python3
#importing stuffs
import speech_recognition as sr
import os
import sys
import re
import webbrowser
import smtplib
import requests
import subprocess
from pyowm import OWM
import youtube_dl
import vlc
import urllib
import urllib3
import json
from bs4 import BeautifulSoup as soup
from urllib.request i... | 20 | 0 | 0 | 1,553 | 0 | 7,572 | 0 | -57 | 819 |
77402bae8e8b2c3ce234d1baa57bbcf8550c4e85 | 1,094 | py | Python | lib/xos-synchronizer/xos-synchronizer-tests/test_event_steps/event_step.py | mary-grace/xos | 3e269834d29f936757f5091183c9b5188ed5cb9e | [
"Apache-2.0"
] | 66 | 2015-01-29T20:56:45.000Z | 2021-07-01T09:56:44.000Z | lib/xos-synchronizer/xos-synchronizer-tests/test_event_steps/event_step.py | mary-grace/xos | 3e269834d29f936757f5091183c9b5188ed5cb9e | [
"Apache-2.0"
] | 112 | 2015-01-30T19:59:09.000Z | 2017-04-08T16:43:40.000Z | lib/xos-synchronizer/xos-synchronizer-tests/test_event_steps/event_step.py | mary-grace/xos | 3e269834d29f936757f5091183c9b5188ed5cb9e | [
"Apache-2.0"
] | 66 | 2015-02-09T17:35:36.000Z | 2021-03-24T12:31:19.000Z | # Copyright 2017-present Open Networking Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agr... | 35.290323 | 81 | 0.756856 | # Copyright 2017-present Open Networking Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agr... | 0 | 0 | 0 | 305 | 0 | 0 | 0 | 49 | 67 |
40ad6cc077d9a49f51d8967b96d2c30ae64493ca | 484 | py | Python | modules/joinall.py | JohnBishop95/MirahezeBots | 4408c65cabac750cd9771f4ed0889f530253bfff | [
"EFL-2.0"
] | null | null | null | modules/joinall.py | JohnBishop95/MirahezeBots | 4408c65cabac750cd9771f4ed0889f530253bfff | [
"EFL-2.0"
] | null | null | null | modules/joinall.py | JohnBishop95/MirahezeBots | 4408c65cabac750cd9771f4ed0889f530253bfff | [
"EFL-2.0"
] | null | null | null | """This module implements .joinall."""
from __future__ import (
unicode_literals,
absolute_import,
print_function,
division
)
| 19.36 | 39 | 0.669421 | """This module implements .joinall."""
from __future__ import (
unicode_literals,
absolute_import,
print_function,
division
)
from sopel import module
import time
@module.require_admin
@module.commands('joinall')
@module.thread(True)
def handle_joins(bot, trigger):
"""Join some channels."""
... | 0 | 278 | 0 | 0 | 0 | 0 | 0 | -7 | 69 |
2c158777c33cf24c011d63203509380559f6719a | 2,052 | py | Python | application/py/crolling.py | MaengJowan/bookshare | aee23df229e67961a2cb92526ac74d2563287fb0 | [
"MIT"
] | null | null | null | application/py/crolling.py | MaengJowan/bookshare | aee23df229e67961a2cb92526ac74d2563287fb0 | [
"MIT"
] | null | null | null | application/py/crolling.py | MaengJowan/bookshare | aee23df229e67961a2cb92526ac74d2563287fb0 | [
"MIT"
] | null | null | null | import sys
word = sys.argv[1]
word = word.strip().replace("&", "+")
main()
| 31.569231 | 142 | 0.634016 | import requests
import json
from bs4 import BeautifulSoup
import sys
word = sys.argv[1]
word = word.strip().replace("&", "+")
def get_coverImg(url):
result=requests.get(url)
soup = BeautifulSoup(result.text, 'html.parser')
div = soup.find("div", {"id":"divDetailInfo"})
if(div == None):
imgUrl = "http://... | 9 | 0 | 0 | 0 | 0 | 1,815 | 0 | -8 | 158 |
b247dcd44831854f5cf0ba67245c72b96e7ebb14 | 1,597 | py | Python | WGALP/blocks/load_krakendb_ramdisk.py | redsnic/WGA-LP | 1d8f4a85843b4220559e3e5cccaaee8c78e1b452 | [
"MIT"
] | 5 | 2021-08-03T17:09:19.000Z | 2021-12-14T18:11:02.000Z | WGALP/blocks/load_krakendb_ramdisk.py | redsnic/WGA-LP | 1d8f4a85843b4220559e3e5cccaaee8c78e1b452 | [
"MIT"
] | null | null | null | WGALP/blocks/load_krakendb_ramdisk.py | redsnic/WGA-LP | 1d8f4a85843b4220559e3e5cccaaee8c78e1b452 | [
"MIT"
] | null | null | null | # --- default imports ---
# --- load utils ---
from WGALP.utils.commandLauncher import run_sp
description = """
load kraken_db in a ramdisk
"""
input_description = """
the position (on disk) of the kraken2 database
"""
output_description = """
the mounting point of the newly created ramdisk
"""
### Wrapper
### Runn... | 28.017544 | 87 | 0.65623 | # --- default imports ---
# --- load utils ---
from WGALP.utils.commandLauncher import run_sp
from WGALP.step import Step
description = """
load kraken_db in a ramdisk
"""
input_description = """
the position (on disk) of the kraken2 database
"""
output_description = """
the mounting point of the newly created ramdis... | 0 | 0 | 0 | 0 | 0 | 342 | 0 | 6 | 44 |
c40972a4bff7bb3ccdd36b0d87f0b2f304adfe8b | 1,166 | py | Python | src/toil/utils/toilDestroyCluster.py | YeoLab/toil | 9837c396b946bc4a0cf97e7c2705e5892b88707b | [
"Apache-2.0"
] | null | null | null | src/toil/utils/toilDestroyCluster.py | YeoLab/toil | 9837c396b946bc4a0cf97e7c2705e5892b88707b | [
"Apache-2.0"
] | 1 | 2017-07-31T23:47:25.000Z | 2017-07-31T23:47:25.000Z | src/toil/utils/toilDestroyCluster.py | lexentbio/toil | 6ad3813af4450962d0899aa6c821189f86472ef9 | [
"Apache-2.0"
] | 1 | 2020-09-17T17:49:32.000Z | 2020-09-17T17:49:32.000Z | # Copyright (C) 2015 UCSC Computational Genomics Lab
#
# 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 o... | 35.333333 | 74 | 0.766724 | # Copyright (C) 2015 UCSC Computational Genomics Lab
#
# 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 o... | 0 | 0 | 0 | 0 | 0 | 268 | 0 | 89 | 89 |
0c4337a0ad68810e4d3b72feb11fc8e929ff526c | 778 | py | Python | Muzact/app.py | Vikash-Kothary/hackathon-project-muzact | f5fdc8537faeda691dccdccc79d45a153c2dbab6 | [
"MIT"
] | null | null | null | Muzact/app.py | Vikash-Kothary/hackathon-project-muzact | f5fdc8537faeda691dccdccc79d45a153c2dbab6 | [
"MIT"
] | null | null | null | Muzact/app.py | Vikash-Kothary/hackathon-project-muzact | f5fdc8537faeda691dccdccc79d45a153c2dbab6 | [
"MIT"
] | null | null | null | from flask import Flask
app = Flask(__name__)
if __name__ == '__main__':
app.run('0.0.0.0', debug = 'True')
| 28.814815 | 74 | 0.661954 | from flask import Flask, request
import requests, json
app = Flask(__name__)
@app.route('/shazam', methods=['GET', 'POST'])
@app.route('/')
def index():
if request.method == 'POST':
return "{'artist':'Taylor Swift', 'song':'style'}"
# return shazam_request(request.data)
return 'Hello World'
def shazam_reque... | 0 | 202 | 0 | 0 | 0 | 384 | 0 | 9 | 69 |
ed5972ed81f4bea34843be0060bc2e8cdc364c2f | 2,287 | py | Python | Decimal_to_Binary_Converter.py | jerryhcooke/Decimal-Binary-Converter | 6ee6d47b33418f65dbcbbaa67b7e2da3c94f9063 | [
"MIT"
] | null | null | null | Decimal_to_Binary_Converter.py | jerryhcooke/Decimal-Binary-Converter | 6ee6d47b33418f65dbcbbaa67b7e2da3c94f9063 | [
"MIT"
] | null | null | null | Decimal_to_Binary_Converter.py | jerryhcooke/Decimal-Binary-Converter | 6ee6d47b33418f65dbcbbaa67b7e2da3c94f9063 | [
"MIT"
] | null | null | null | # A converter that takes a denary number and converts it, using comparison
# rather than recursion, to binary
import sys
from colorama import init
from termcolor import cprint
from pyfiglet import figlet_format
init(strip=not sys.stdout.isatty())
cprint(figlet_format('Binary / Decimal Converter', font='doom'), 'whit... | 31.763889 | 79 | 0.615216 | # A converter that takes a denary number and converts it, using comparison
# rather than recursion, to binary
import sys
from colorama import init
from termcolor import cprint
from pyfiglet import figlet_format
init(strip=not sys.stdout.isatty())
cprint(figlet_format('Binary / Decimal Converter', font='doom'), 'whit... | 0 | 0 | 0 | 0 | 0 | 847 | 0 | 0 | 69 |
0fc69002b14a34c3e184479e98b73ecbe4f4b141 | 2,341 | py | Python | appliedpy_ecourse/class7/ex2_models.py | fallenfuzz/pynet | 9624d83cca160fd325a34e838e4474c9b80fe2ab | [
"Apache-2.0"
] | 528 | 2015-01-07T15:28:51.000Z | 2022-03-27T09:45:37.000Z | appliedpy_ecourse/class7/ex2_models.py | fallenfuzz/pynet | 9624d83cca160fd325a34e838e4474c9b80fe2ab | [
"Apache-2.0"
] | 19 | 2015-07-01T23:52:27.000Z | 2021-09-22T04:30:34.000Z | appliedpy_ecourse/class7/ex2_models.py | fallenfuzz/pynet | 9624d83cca160fd325a34e838e4474c9b80fe2ab | [
"Apache-2.0"
] | 555 | 2015-01-18T07:21:43.000Z | 2022-03-20T21:25:22.000Z | '''
Add an SnmpCredentials model to the models.py file. This model should support
both SNMPv3 and SNMPv1/v2c. Add a foreign key reference in the NetworkDevice
model pointing to the SnmpCredentials model.
'''
| 48.770833 | 80 | 0.699701 | '''
Add an SnmpCredentials model to the models.py file. This model should support
both SNMPv3 and SNMPv1/v2c. Add a foreign key reference in the NetworkDevice
model pointing to the SnmpCredentials model.
'''
from django.db import models
class Credentials(models.Model):
username = models.CharField(max_le... | 0 | 0 | 0 | 2,031 | 0 | 0 | 0 | 7 | 92 |
d168eea59a42d588125683162b3e1f7ba5c1b21c | 988 | py | Python | epics/devices/ad_image.py | juanfem/pyepics | 6ced9237aa51e306a48057be0f80b08e44dbf0ae | [
"OML"
] | 55 | 2015-05-09T14:42:51.000Z | 2022-02-21T19:53:06.000Z | epics/devices/ad_image.py | juanfem/pyepics | 6ced9237aa51e306a48057be0f80b08e44dbf0ae | [
"OML"
] | 192 | 2015-01-22T16:36:41.000Z | 2022-02-09T17:19:17.000Z | epics/devices/ad_image.py | juanfem/pyepics | 6ced9237aa51e306a48057be0f80b08e44dbf0ae | [
"OML"
] | 43 | 2015-09-15T20:55:02.000Z | 2022-02-21T19:53:07.000Z | from .. import Device
| 30.875 | 69 | 0.572874 | from .. import Device
class AD_ImagePlugin(Device):
"""
AreaDetector Image Plugin
"""
attrs = ('ArrayData',
'UniqueId', 'UniqueId_RBV',
'NDimensions', 'NDimensions_RBV',
'ArraySize0', 'ArraySize0_RBV',
'ArraySize1', 'ArraySize1_RBV',
'Arr... | 0 | 0 | 0 | 942 | 0 | 0 | 0 | 0 | 23 |
6327f2a9bb703904fc001768cbf7a0f87cd749ea | 4,196 | py | Python | script/tazerUtil/serverUtil.py | jstrube/tazer | 18a6d66ad2c20376609f1af7940e43b2031e4fd0 | [
"BSD-3-Clause"
] | null | null | null | script/tazerUtil/serverUtil.py | jstrube/tazer | 18a6d66ad2c20376609f1af7940e43b2031e4fd0 | [
"BSD-3-Clause"
] | null | null | null | script/tazerUtil/serverUtil.py | jstrube/tazer | 18a6d66ad2c20376609f1af7940e43b2031e4fd0 | [
"BSD-3-Clause"
] | null | null | null |
# This is a Tazer Server class. It is here to help wrap several functions that
# exist across the Tazer source. The Commands listed in the arguments are the
# equivalent commands (and arguments) as if run from the build tree. | 41.137255 | 99 | 0.637274 | import subprocess as sp
from . import util
# This is a Tazer Server class. It is here to help wrap several functions that
# exist across the Tazer source. The Commands listed in the arguments are the
# equivalent commands (and arguments) as if run from the build tree.
class TazerServer:
# The path is the path to... | 0 | 0 | 0 | 3,903 | 0 | 0 | 0 | -1 | 66 |
903d6526666ce50546bae687fd6815485193c917 | 915 | py | Python | altstreamfield/utils.py | didorothy/wagtailaltstreamfield | 00b6be4420e031036f1d2d6c0122969df7fb3900 | [
"BSD-2-Clause"
] | null | null | null | altstreamfield/utils.py | didorothy/wagtailaltstreamfield | 00b6be4420e031036f1d2d6c0122969df7fb3900 | [
"BSD-2-Clause"
] | 20 | 2019-11-12T16:49:32.000Z | 2021-03-09T23:04:20.000Z | altstreamfield/utils.py | didorothy/wagtailaltstreamfield | 00b6be4420e031036f1d2d6c0122969df7fb3900 | [
"BSD-2-Clause"
] | null | null | null | from django.forms.widgets import Media
def get_class_media(base, instance):
'''Convenience function to be used when overriding the `media` property.
This function maintains the tasks of the media property set up by
`MediaDefiningClass` but allows you to extend the normal behavior.
Use:
class MyCl... | 31.551724 | 76 | 0.571585 | from django.forms.widgets import Media
def get_class_media(base, instance):
'''Convenience function to be used when overriding the `media` property.
This function maintains the tasks of the media property set up by
`MediaDefiningClass` but allows you to extend the normal behavior.
Use:
class MyCl... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
d9fe82a160d5b6f40eb7f848610280b2b907fd7b | 1,213 | py | Python | examples/reference/models/select_server.py | g-parki/bokeh | 664ead5306bba64609e734d4105c8aa8cfb76d81 | [
"BSD-3-Clause"
] | 15,193 | 2015-01-01T05:11:45.000Z | 2022-03-31T19:30:20.000Z | examples/reference/models/select_server.py | g-parki/bokeh | 664ead5306bba64609e734d4105c8aa8cfb76d81 | [
"BSD-3-Clause"
] | 9,554 | 2015-01-01T03:16:54.000Z | 2022-03-31T22:59:39.000Z | examples/reference/models/select_server.py | g-parki/bokeh | 664ead5306bba64609e734d4105c8aa8cfb76d81 | [
"BSD-3-Clause"
] | 4,829 | 2015-01-02T03:35:32.000Z | 2022-03-30T16:40:26.000Z | ## Bokeh server for Select
import pandas as pd
from bokeh.io import curdoc
from bokeh.layouts import row
from bokeh.models import ColumnDataSource, Select
from bokeh.plotting import figure
x=[3,4,6,12,10,1,5,6,3,8]
y=[7,1,3,4,1,6,10,4,10,3]
label=['Red', 'Orange', 'Red', 'Orange','Red', 'Orange','Red', 'Orange','Red'... | 29.585366 | 93 | 0.695796 | ## Bokeh server for Select
import pandas as pd
from bokeh.io import curdoc
from bokeh.layouts import row
from bokeh.models import ColumnDataSource, Select
from bokeh.plotting import figure
x=[3,4,6,12,10,1,5,6,3,8]
y=[7,1,3,4,1,6,10,4,10,3]
label=['Red', 'Orange', 'Red', 'Orange','Red', 'Orange','Red', 'Orange','Red'... | 0 | 0 | 0 | 0 | 0 | 319 | 0 | 0 | 23 |
da1d50a4f230ab93ab71b745cfeb7b321c903875 | 1,055 | py | Python | src/sample/corpus_extraction_sklearn.py | humanist96/kmorph | 0fc9ccdf77847de9602ca0c7f428e9dbb813b984 | [
"Apache-2.0"
] | null | null | null | src/sample/corpus_extraction_sklearn.py | humanist96/kmorph | 0fc9ccdf77847de9602ca0c7f428e9dbb813b984 | [
"Apache-2.0"
] | null | null | null | src/sample/corpus_extraction_sklearn.py | humanist96/kmorph | 0fc9ccdf77847de9602ca0c7f428e9dbb813b984 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
from sklearn.feature_extraction.text import CountVectorizer
from natto import MeCab
_morpheme_type = ['NNG', 'NNP']
_escape_pattern = ['\n']
_nm = MeCab()
corpus = generate_corpus2('news.txt')
print('corpus : ', corpus)
_cv = CountVectorizer()
word_matrix = _cv.fit_transform(corpus)
inde... | 23.977273 | 59 | 0.627488 | # -*- coding: utf-8 -*-
from sklearn.feature_extraction.text import CountVectorizer
from natto import MeCab
_morpheme_type = ['NNG', 'NNP']
_escape_pattern = ['\n']
_nm = MeCab()
def filter_by_type(text):
terms = []
for term_info in str(_nm.parse(text)).split('\n'):
_term_info = term_info.split('\t... | 0 | 0 | 0 | 0 | 0 | 573 | 0 | 0 | 46 |
03eae6ce95f068bc2d9cb82135f48b30fa2fa332 | 2,894 | py | Python | UIBox/item.py | yemenPython/TheBossBaby | 86e447b3fa360646a179e62c70b1750da5427541 | [
"MIT"
] | 1 | 2021-12-16T16:31:29.000Z | 2021-12-16T16:31:29.000Z | UIBox/item.py | yemenPython/TheBossBaby | 86e447b3fa360646a179e62c70b1750da5427541 | [
"MIT"
] | null | null | null | UIBox/item.py | yemenPython/TheBossBaby | 86e447b3fa360646a179e62c70b1750da5427541 | [
"MIT"
] | 1 | 2021-12-16T16:31:35.000Z | 2021-12-16T16:31:35.000Z | #!/usr/bin/python3
| 36.632911 | 104 | 0.653766 | #!/usr/bin/python3
from PyQt5 import QtCore, QtGui, QtWidgets
class UIBUi_Item(QtWidgets.QWidget):
def __init__(self):
super(UIBUi_Item, self).__init__()
self.setObjectName("Form")
self.setMouseTracking(True)
self.gridLayout_2 = QtWidgets.QGridLayout(self)
self.gridLayout... | 0 | 0 | 0 | 2,808 | 0 | 0 | 0 | 21 | 46 |
64abab9832222fe0a8a6331f331b74645977e71e | 5,313 | py | Python | sentenceSpliter.py | neerbek/taboo-mon | 3dc74fd38b112531db8b5f696ed92b894cc0a3b3 | [
"MIT"
] | 1 | 2021-05-10T00:27:10.000Z | 2021-05-10T00:27:10.000Z | sentenceSpliter.py | neerbek/taboo-mon | 3dc74fd38b112531db8b5f696ed92b894cc0a3b3 | [
"MIT"
] | null | null | null | sentenceSpliter.py | neerbek/taboo-mon | 3dc74fd38b112531db8b5f696ed92b894cc0a3b3 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on April 12, 2018
@author: neerbek
"""
import os
import getopt
import sys
import io
import monUtil
import monsantoData
import textClean
import server_rnn_helper
from similarity import load_trees
from importlib import reload
reload(textClean)
# from backends import PDFMinerBack... | 31.070175 | 153 | 0.652174 | # -*- coding: utf-8 -*-
"""
Created on April 12, 2018
@author: neerbek
"""
import os
import getopt
import sys
import io
import monUtil
import monsantoData
import textClean
import server_rnn_helper
from similarity import load_trees
from importlib import reload
reload(textClean)
# from backends import PDFMinerBack... | 0 | 0 | 0 | 0 | 0 | 143 | 0 | 0 | 23 |
b2dc8eb7563fbeae7c3260ea4983e67be1ebdf31 | 974 | py | Python | Ex028.py | andrade-lcs/ex_curso_em_video_python | f2d029efe7a20cdf0fcb5b602f9992e27d37c263 | [
"MIT"
] | null | null | null | Ex028.py | andrade-lcs/ex_curso_em_video_python | f2d029efe7a20cdf0fcb5b602f9992e27d37c263 | [
"MIT"
] | null | null | null | Ex028.py | andrade-lcs/ex_curso_em_video_python | f2d029efe7a20cdf0fcb5b602f9992e27d37c263 | [
"MIT"
] | null | null | null | #t=int(input('Quantos anos tem seu carro?'))
#if t <=3:
# print('Carro novo')
#else:
# print('Carro velho')
#print('Carro novo' if t<=3 else 'Carro velho')
#print('fim')
# print('Que nome lindo')
#print('Bom dia, {}'.format(n))
#print('fim')
#_____________________________
import random
from time import sleep
c ... | 30.4375 | 90 | 0.616016 | #t=int(input('Quantos anos tem seu carro?'))
#if t <=3:
# print('Carro novo')
#else:
# print('Carro velho')
#print('Carro novo' if t<=3 else 'Carro velho')
#print('fim')
# print('Que nome lindo')
#print('Bom dia, {}'.format(n))
#print('fim')
#_____________________________
import random
from time import sleep
c ... | 18 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
eb225baa26daf67586d587e4ced2d1f3464104dc | 5,232 | py | Python | daluke/plot/plot_finetune_ner.py | peleiden/daluke | d2c85ba6b80021b2959b369381c447d18b058576 | [
"MIT"
] | 10 | 2021-07-06T08:31:45.000Z | 2021-12-17T09:13:33.000Z | daluke/plot/plot_finetune_ner.py | peleiden/daLUKE | d2c85ba6b80021b2959b369381c447d18b058576 | [
"MIT"
] | 70 | 2021-03-26T13:30:39.000Z | 2021-06-10T15:06:36.000Z | daluke/plot/plot_finetune_ner.py | peleiden/daluke | d2c85ba6b80021b2959b369381c447d18b058576 | [
"MIT"
] | null | null | null | from __future__ import annotations
from pelutils.logger import log
from pelutils.ds.plot import update_rc_params, rc_params
update_rc_params(rc_params)
if __name__ == "__main__":
with log.log_errors:
make_finetuning_plots()
| 37.106383 | 183 | 0.661888 | from __future__ import annotations
import os
import click
from pelutils.logger import log
from pelutils.ds.plot import figsize_std, tab_colours, update_rc_params, rc_params
import matplotlib.pyplot as plt
from matplotlib.lines import Line2D
import numpy as np
from daluke.ner.training import TrainResults
from daluke.... | 0 | 439 | 0 | 0 | 0 | 4,219 | 0 | 63 | 272 |
06fdf5dfdb4933696507f332998511229cae25be | 833 | py | Python | VSCode_work/chapter10/chapter10_10_10.py | yangyahu-1994/Python-Crash-Course | 6f8ef7fe8466d88931a0d3cc423ba5d966663b9d | [
"MIT"
] | 12 | 2020-10-22T14:03:27.000Z | 2022-03-28T08:14:22.000Z | VSCode_work/chapter10/chapter10_10_10.py | yangyahu-1994/Python-Crash-Course | 6f8ef7fe8466d88931a0d3cc423ba5d966663b9d | [
"MIT"
] | null | null | null | VSCode_work/chapter10/chapter10_10_10.py | yangyahu-1994/Python-Crash-Course | 6f8ef7fe8466d88931a0d3cc423ba5d966663b9d | [
"MIT"
] | 9 | 2020-12-22T10:22:12.000Z | 2022-03-28T08:14:53.000Z | #
def count_numbers(filename):
"""'the'"""
try:
with open(filename) as file_object:
contents = file_object.read()
except FileNotFoundError:
print(f"Sorry, the file {filename} does not exits.")
else:
#
numbers = contents.lower().count('the')
print(f"T... | 41.65 | 115 | 0.683073 | # 定义函数
def count_numbers(filename):
"""获取指定的文件,并计算单词'the'在每个文件中出现的次数"""
try:
with open(filename) as file_object:
contents = file_object.read()
except FileNotFoundError:
print(f"Sorry, the file {filename} does not exits.")
else:
# 计算出现的次数
numbers = contents.low... | 117 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
01db368e89b0bf8334c4f381333f9897fa93f294 | 793 | py | Python | apps/article/tests/article/test_article_list.py | magocod/django_repository | 660664ba2321499e92c3c5c23719756db2569e90 | [
"MIT"
] | 1 | 2019-10-01T01:39:29.000Z | 2019-10-01T01:39:29.000Z | apps/article/tests/article/test_article_list.py | magocod/django_repository | 660664ba2321499e92c3c5c23719756db2569e90 | [
"MIT"
] | 7 | 2019-12-04T21:40:40.000Z | 2020-06-26T21:49:51.000Z | apps/article/tests/article/test_article_list.py | magocod/django_repository | 660664ba2321499e92c3c5c23719756db2569e90 | [
"MIT"
] | 1 | 2020-04-08T02:46:31.000Z | 2020-04-08T02:46:31.000Z | # standard library
# local Django
| 29.37037 | 71 | 0.727617 | # standard library
import json
# local Django
from apps.article.models import Article
from apps.article.serializers.article import ArticleHeavySerializer
from apps.tests.fixtures import RepositoryTestCase
class ListArticleTest(RepositoryTestCase):
"""
...
"""
serializer = ArticleHeavySerializer
... | 0 | 0 | 0 | 563 | 0 | 0 | 0 | 83 | 111 |
e3fac1b3c3b5a1717c6d26e6cb738d1ed4d5e6c2 | 8,281 | py | Python | syne_tune/optimizer/schedulers/transfer_learning/zero_shot.py | awslabs/syne-tune | 1dd8e157477b86db01047a9a7821780ea04389bc | [
"ECL-2.0",
"Apache-2.0"
] | 97 | 2021-11-18T17:14:30.000Z | 2022-03-29T00:33:12.000Z | syne_tune/optimizer/schedulers/transfer_learning/zero_shot.py | awslabs/syne-tune | 1dd8e157477b86db01047a9a7821780ea04389bc | [
"ECL-2.0",
"Apache-2.0"
] | 54 | 2021-11-18T17:14:12.000Z | 2022-03-22T08:11:48.000Z | syne_tune/optimizer/schedulers/transfer_learning/zero_shot.py | awslabs/syne-tune | 1dd8e157477b86db01047a9a7821780ea04389bc | [
"ECL-2.0",
"Apache-2.0"
] | 9 | 2021-11-29T11:47:32.000Z | 2022-02-24T15:28:11.000Z | # Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License").
# You may not use this file except in compliance with the License.
# A copy of the License is located at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# or in the "license... | 44.762162 | 120 | 0.662601 | # Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License").
# You may not use this file except in compliance with the License.
# A copy of the License is located at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# or in the "license... | 0 | 0 | 0 | 7,214 | 0 | 0 | 0 | 237 | 201 |
5a21299c7960ef147aa799e8ad8d4e56f46263b8 | 423 | py | Python | copymaks.py | LittleQBerry/sklearn-logist | 4ed208547b9d93171a8da14d3d010ec721cd17fa | [
"MIT"
] | null | null | null | copymaks.py | LittleQBerry/sklearn-logist | 4ed208547b9d93171a8da14d3d010ec721cd17fa | [
"MIT"
] | null | null | null | copymaks.py | LittleQBerry/sklearn-logist | 4ed208547b9d93171a8da14d3d010ec721cd17fa | [
"MIT"
] | null | null | null | import os
from shutil import copyfile
from os import listdir
save_dir =r'J:/game/seg_classification/data/'
imgs_dir =r'J:/game/seg_classification/_ouput_dir_/'
if not os.path.isdir(save_dir):
os.makedirs(save_dir)
for files in listdir(imgs_dir):
if files[-5] =='0':
source_file=os.path.join(imgs_dir ... | 22.263158 | 52 | 0.718676 | import os
from shutil import copyfile
from os import listdir
save_dir =r'J:/game/seg_classification/data/'
imgs_dir =r'J:/game/seg_classification/_ouput_dir_/'
if not os.path.isdir(save_dir):
os.makedirs(save_dir)
for files in listdir(imgs_dir):
if files[-5] =='0':
source_file=os.path.join(imgs_dir ... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
c313d884667195d72422dcbdf27ccb9ddfa77912 | 3,927 | py | Python | haiku/_src/random_test.py | rushic24/dm-haiku | 8ee1a2125587831783ae7ae1e74baacec23ae56d | [
"Apache-2.0"
] | null | null | null | haiku/_src/random_test.py | rushic24/dm-haiku | 8ee1a2125587831783ae7ae1e74baacec23ae56d | [
"Apache-2.0"
] | null | null | null | haiku/_src/random_test.py | rushic24/dm-haiku | 8ee1a2125587831783ae7ae1e74baacec23ae56d | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 DeepMind Technologies Limited. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by ... | 32.188525 | 80 | 0.66794 | # Copyright 2019 DeepMind Technologies Limited. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by ... | 0 | 0 | 0 | 2,777 | 81 | 0 | 0 | 7 | 246 |
d7b4ca7a20b08e02e79aa7bd12cd25a873780374 | 3,180 | py | Python | najdisi_sms/cli.py | brodul/najdi-si-sms | a73c2bfb55bcf7e2bfb4a75f50adff166873c6ed | [
"BSD-3-Clause"
] | 5 | 2016-01-08T21:35:21.000Z | 2018-10-11T08:59:21.000Z | najdisi_sms/cli.py | brodul/najdi-si-sms | a73c2bfb55bcf7e2bfb4a75f50adff166873c6ed | [
"BSD-3-Clause"
] | 4 | 2016-01-09T14:30:33.000Z | 2017-09-16T17:39:49.000Z | najdisi_sms/cli.py | brodul/najdi-si-sms | a73c2bfb55bcf7e2bfb4a75f50adff166873c6ed | [
"BSD-3-Clause"
] | 2 | 2017-09-08T21:45:25.000Z | 2018-10-16T11:55:13.000Z |
from najdisi_sms import utils
log = utils.get_logger()
if __name__ == '__main__':
main()
| 27.179487 | 70 | 0.545597 | from argparse import ArgumentParser
import os
import sys
from six.moves.configparser import ConfigParser
from najdisi_sms import utils
from .api import SMSSender
log = utils.get_logger()
class SettingParser(object):
"""docstring for SettingParser"""
def __init__(self, args=None):
self.args = args o... | 0 | 0 | 0 | 2,681 | 0 | 221 | 0 | 22 | 157 |
93045327b67530baa933c410a2531ed53bd0fbbd | 6,484 | py | Python | utils/metrics.py | Hua-YS/Multi-Scene-Recognition | 5c3db2a893221a1b49482675ac5f03532edd4f85 | [
"MIT"
] | 5 | 2021-06-28T12:49:38.000Z | 2021-09-07T11:21:29.000Z | utils/metrics.py | Hua-YS/Multi-Scene-Recognition | 5c3db2a893221a1b49482675ac5f03532edd4f85 | [
"MIT"
] | null | null | null | utils/metrics.py | Hua-YS/Multi-Scene-Recognition | 5c3db2a893221a1b49482675ac5f03532edd4f85 | [
"MIT"
] | 2 | 2021-07-19T09:19:11.000Z | 2021-11-07T20:25:04.000Z | """
Modified from ML-GCN/util.py:
* adding calculations: OP, OR, OF1, CP, CR, CF1, EP, ER, EF1
* removing args: difficult_examples
"""
| 35.048649 | 111 | 0.549352 | """
Modified from ML-GCN/util.py:
* adding calculations: OP, OR, OF1, CP, CR, CF1, EP, ER, EF1
* removing args: difficult_examples
"""
import math
import torch
from PIL import Image
from tqdm import tqdm
import numpy as np
import random
import torch.nn.functional as F
class AveragePrecisionMeter(object):
def __i... | 0 | 599 | 0 | 5,589 | 0 | 0 | 0 | -20 | 179 |
c8983a64630f30f7f21c9bbdaa9a782c0bbb3db8 | 3,862 | py | Python | compmatscipy/MyStats.py | YunyeongChoi/compmatscipy | 44d0fe9f4d3806a21ee3bfcbca24b42120d91193 | [
"MIT"
] | 5 | 2019-08-19T14:48:31.000Z | 2022-03-24T20:08:31.000Z | compmatscipy/MyStats.py | YunyeongChoi/compmatscipy | 44d0fe9f4d3806a21ee3bfcbca24b42120d91193 | [
"MIT"
] | 1 | 2019-08-24T16:51:29.000Z | 2019-08-24T16:51:29.000Z | compmatscipy/MyStats.py | YunyeongChoi/compmatscipy | 44d0fe9f4d3806a21ee3bfcbca24b42120d91193 | [
"MIT"
] | 5 | 2019-07-16T19:15:28.000Z | 2021-03-29T04:49:54.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Tue Aug 6 12:05:46 2019
@author: chrisbartel
""" | 31.145161 | 95 | 0.56318 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Tue Aug 6 12:05:46 2019
@author: chrisbartel
"""
import numpy as np
from sklearn.metrics import confusion_matrix, r2_score
def _make_binary_labels(data, thresh):
return [1 if v <= thresh else 0 for v in data]
class MyStats(object):
def __ini... | 0 | 1,964 | 0 | 1,598 | 0 | 68 | 0 | 30 | 90 |
74891ac87248010c5d11d2a67dbd35f68b342069 | 29 | py | Python | examples/class_trivial.py | doboy/Underscore | d98273db3144cda79191d2c90f45d81b6d700b1f | [
"MIT"
] | 7 | 2016-09-23T00:44:05.000Z | 2021-10-04T21:19:12.000Z | examples/class_trivial.py | jameswu1991/Underscore | d98273db3144cda79191d2c90f45d81b6d700b1f | [
"MIT"
] | 1 | 2016-09-23T00:45:05.000Z | 2019-02-16T19:05:37.000Z | examples/class_trivial.py | jameswu1991/Underscore | d98273db3144cda79191d2c90f45d81b6d700b1f | [
"MIT"
] | 3 | 2016-09-23T01:13:15.000Z | 2018-07-20T21:22:17.000Z |
Bar()
| 5.8 | 12 | 0.517241 | class Bar():
pass
Bar()
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 22 |
983347675b3f89295d6d1c7b7c4125a61b2ca029 | 771 | py | Python | project_euler/problem_13/sol1.py | ming-nju/Python_learn | a0d31fe79310ed636047b1595da04a824394f3bc | [
"MIT"
] | 2 | 2019-07-19T07:45:01.000Z | 2019-07-19T07:45:09.000Z | project_euler/problem_13/sol1.py | ming-nju/Python_learn | a0d31fe79310ed636047b1595da04a824394f3bc | [
"MIT"
] | null | null | null | project_euler/problem_13/sol1.py | ming-nju/Python_learn | a0d31fe79310ed636047b1595da04a824394f3bc | [
"MIT"
] | 3 | 2019-04-29T02:36:37.000Z | 2019-10-05T12:17:59.000Z | """
Problem Statement:
Work out the first ten digits of the sum of the following one-hundred 50-digit
numbers.
"""
from __future__ import print_function
try:
raw_input # Python 2
except NameError:
raw_input = input # Python 3
def solution(array):
"""Returns the first ten digits of the sum of the array ... | 20.837838 | 78 | 0.594034 | """
Problem Statement:
Work out the first ten digits of the sum of the following one-hundred 50-digit
numbers.
"""
from __future__ import print_function
import os
try:
raw_input # Python 2
except NameError:
raw_input = input # Python 3
def solution(array):
"""Returns the first ten digits of the sum of ... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | -12 | 22 |
042b8109e2f671dcb6a5528205ba2a23432c656d | 1,200 | py | Python | SUAVE/SUAVE-2.5.0/trunk/SUAVE/Methods/Flight_Dynamics/Dynamic_Stability/Full_Linearized_Equations/Supporting_Functions/cm_alphadot.py | Vinicius-Tanigawa/Undergraduate-Research-Project | e92372f07882484b127d7affe305eeec2238b8a9 | [
"MIT"
] | null | null | null | SUAVE/SUAVE-2.5.0/trunk/SUAVE/Methods/Flight_Dynamics/Dynamic_Stability/Full_Linearized_Equations/Supporting_Functions/cm_alphadot.py | Vinicius-Tanigawa/Undergraduate-Research-Project | e92372f07882484b127d7affe305eeec2238b8a9 | [
"MIT"
] | null | null | null | SUAVE/SUAVE-2.5.0/trunk/SUAVE/Methods/Flight_Dynamics/Dynamic_Stability/Full_Linearized_Equations/Supporting_Functions/cm_alphadot.py | Vinicius-Tanigawa/Undergraduate-Research-Project | e92372f07882484b127d7affe305eeec2238b8a9 | [
"MIT"
] | null | null | null | ## @ingroup Methods-Flight_Dynamics-Dynamic_Stability-Full_Linearized_Equations-Supporting_Functions
# cm_alphadot.py
#
# Created: Jun 2014, A. Wendorff
# Modified: Jan 2016, E. Botero
# ----------------------------------------------------------------------
# Method
# ----------------------------------------------... | 30.769231 | 100 | 0.55 | ## @ingroup Methods-Flight_Dynamics-Dynamic_Stability-Full_Linearized_Equations-Supporting_Functions
# cm_alphadot.py
#
# Created: Jun 2014, A. Wendorff
# Modified: Jan 2016, E. Botero
# ----------------------------------------------------------------------
# Method
# ----------------------------------------------... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
59a020e72f267e4924a4e2b3801e624ac28cb564 | 539 | py | Python | regex/count_smiley_faces.py | ahmedelq/PythonicAlgorithms | ce10dbb6e1fd0ea5c922a932b0f920236aa411bf | [
"MIT"
] | null | null | null | regex/count_smiley_faces.py | ahmedelq/PythonicAlgorithms | ce10dbb6e1fd0ea5c922a932b0f920236aa411bf | [
"MIT"
] | null | null | null | regex/count_smiley_faces.py | ahmedelq/PythonicAlgorithms | ce10dbb6e1fd0ea5c922a932b0f920236aa411bf | [
"MIT"
] | null | null | null |
#Author: ahmelq - github.com/ahmedelq/
#License: MIT
#This is a solution of https://www.codewars.com/kata/583203e6eb35d7980400002a
if __name__ == "__main__":
print(
countSmileys([':)', ';(', ';}', ':-D']), # should return 2
countSmileys([';D', ':-(', ':-)', ';~)']), # should return ... | 26.95 | 77 | 0.489796 |
#Author: ahmelq - github.com/ahmedelq/
#License: MIT
#This is a solution of https://www.codewars.com/kata/583203e6eb35d7980400002a
def countSmileys(arr):
import re
return len(
re.compile(r'[:;][-~]?[\)D]')
.findall(' '.join(arr))
)
if __name__ == "__main__":
print(
coun... | 0 | 0 | 0 | 0 | 0 | 111 | 0 | 0 | 23 |
10d104b9b64fc13f624cb8a75615a586496f8dc6 | 6,984 | py | Python | plastron/commands/export.py | dsteelma-umd/plastron | d0e344c65ee2dfeba4fd78df3f73a1ae5f42b1d0 | [
"Apache-2.0"
] | null | null | null | plastron/commands/export.py | dsteelma-umd/plastron | d0e344c65ee2dfeba4fd78df3f73a1ae5f42b1d0 | [
"Apache-2.0"
] | null | null | null | plastron/commands/export.py | dsteelma-umd/plastron | d0e344c65ee2dfeba4fd78df3f73a1ae5f42b1d0 | [
"Apache-2.0"
] | null | null | null | import logging
from plastron.namespaces import get_manager
logger = logging.getLogger(__name__)
nsm = get_manager()
| 36.375 | 113 | 0.507016 | import json
import logging
import os
from argparse import Namespace
from datetime import datetime
from tempfile import NamedTemporaryFile
from time import sleep
from plastron import pcdm
from plastron.stomp import Message
from plastron.exceptions import FailureException, DataReadException, RESTAPIException
from plast... | 0 | 0 | 0 | 2,639 | 0 | 3,773 | 0 | 139 | 313 |
2d0af0d7fb0d233d7cf933b498df9ce8898f7a13 | 8,312 | py | Python | helpers/ResNet.py | kchare/advex_notbugs_features | 0ec0578a1aba2bdb86854676c005488091b64123 | [
"MIT"
] | 2 | 2022-02-08T11:51:12.000Z | 2022-02-23T00:30:07.000Z | helpers/ResNet.py | kchare/advex_notbugs_features | 0ec0578a1aba2bdb86854676c005488091b64123 | [
"MIT"
] | null | null | null | helpers/ResNet.py | kchare/advex_notbugs_features | 0ec0578a1aba2bdb86854676c005488091b64123 | [
"MIT"
] | 2 | 2021-12-21T20:31:28.000Z | 2022-01-21T17:06:34.000Z | <<<<<<< HEAD
'''Implements ResNet9,..56 dynamically for CIFAR-10
Description of implementation can be found here: https://arxiv.org/pdf/1512.03385.pdf'''
import tensorflow as
class ResNetBlock(tf.keras.layers.Layer):
'''See official RStudio/Keras documentation here:
https://github.com/rstudio/keras/blob/main/vigne... | 45.922652 | 131 | 0.664461 | <<<<<<< HEAD
'''Implements ResNet9,..56 dynamically for CIFAR-10
Description of implementation can be found here: https://arxiv.org/pdf/1512.03385.pdf'''
import tensorflow as
class ResNetBlock(tf.keras.layers.Layer):
'''See official RStudio/Keras documentation here:
https://github.com/rstudio/keras/blob/main/vigne... | 0 | 0 | 0 | 3,816 | 0 | 2,999 | 0 | 0 | 144 |
ab8bb7e5f5c38a866610aeab2dfd90be6b13a3ea | 44,907 | py | Python | redun/backends/db/dataflow.py | cclauss/redun | 55792921b42b430571eafc30ab21eb50eb4f64b3 | [
"Apache-2.0"
] | null | null | null | redun/backends/db/dataflow.py | cclauss/redun | 55792921b42b430571eafc30ab21eb50eb4f64b3 | [
"Apache-2.0"
] | null | null | null | redun/backends/db/dataflow.py | cclauss/redun | 55792921b42b430571eafc30ab21eb50eb4f64b3 | [
"Apache-2.0"
] | null | null | null | """
Dataflow visualization.
An upstream dataflow visualization explains the derivation of a value. Take
for example this dataflow visualization of the derivation of a VCF file
from a bioinformatic analysis:
```
value = File(path=sample4.vcf, hash=********)
value <-- <********> call_variants(bam, ref_genome)
bam ... | 31.939545 | 99 | 0.628944 | """
Dataflow visualization.
An upstream dataflow visualization explains the derivation of a value. Take
for example this dataflow visualization of the derivation of a VCF file
from a bioinformatic analysis:
```
value = File(path=sample4.vcf, hash=********)
value <-- <********> call_variants(bam, ref_genome)
bam ... | 0 | 0 | 0 | 3,589 | 19,908 | 0 | 0 | 94 | 550 |
b0c91e83a9b74bb222678d78da749bca5e26d7a9 | 1,131 | py | Python | visualization_scripts/depth_distributions.py | crmauceri/pytorch-deeplab-xception | aec2cb7b0c09c346519c6bf22c2cbf419021fdc7 | [
"MIT"
] | 1 | 2021-12-11T08:21:19.000Z | 2021-12-11T08:21:19.000Z | visualization_scripts/depth_distributions.py | crmauceri/rgbd_deeplab | aec2cb7b0c09c346519c6bf22c2cbf419021fdc7 | [
"MIT"
] | null | null | null | visualization_scripts/depth_distributions.py | crmauceri/rgbd_deeplab | aec2cb7b0c09c346519c6bf22c2cbf419021fdc7 | [
"MIT"
] | null | null | null |
from deeplab3.config.defaults import get_cfg_defaults
from dataloaders.utils import sample_distribution
from dataloaders.datasets.cityscapes import CityscapesSegmentation
from dataloaders.datasets.sunrgbd import RGBDSegmentation
city_rgbd = get_cfg_defaults()
city_rgbd.merge_from_file('configs/cityscapes_rgbd.yaml')... | 37.7 | 99 | 0.821397 | import matplotlib.pyplot as plt
import scipy.stats
import numpy as np
from tqdm import tqdm
from PIL import Image
from deeplab3.config.defaults import get_cfg_defaults
from dataloaders.utils import sample_distribution
from dataloaders.datasets.cityscapes import CityscapesSegmentation
from dataloaders.datasets.coco i... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 65 | 156 |
3934a4a0ed4d91e9682e7a523fecefc8304cc24f | 7,933 | py | Python | src/cc_catalog_airflow/dags/provider_api_scripts/test_walters_art_museum.py | gauravahlawat81/cccatalog | cabfa11c4e1d68c66390ed46649282b7d33e2c58 | [
"MIT"
] | 65 | 2018-05-25T00:47:18.000Z | 2021-11-30T05:58:43.000Z | src/cc_catalog_airflow/dags/provider_api_scripts/test_walters_art_museum.py | cc-archive/cccatalog | bc95ccc159ed7f1444d44e1db08d9a11a16c6d12 | [
"MIT"
] | 463 | 2018-05-01T14:35:42.000Z | 2021-06-11T20:32:50.000Z | src/cc_catalog_airflow/dags/provider_api_scripts/test_walters_art_museum.py | cc-archive/cccatalog | bc95ccc159ed7f1444d44e1db08d9a11a16c6d12 | [
"MIT"
] | 81 | 2018-05-05T20:33:12.000Z | 2021-04-28T02:23:10.000Z | import os
import logging
RESOURCES = os.path.join(
os.path.abspath(os.path.dirname(__file__)),
'tests/resources/waltersartmuseum'
)
logging.basicConfig(
format='%(asctime)s - %(name)s - %(levelname)s: %(message)s',
level=logging.DEBUG
)
logger = logging.getLogger(__name__)
# _get_image_list test... | 32.646091 | 101 | 0.708307 | import os
import json
import logging
import requests
from unittest.mock import patch, MagicMock
import walters_art_museum as wam
RESOURCES = os.path.join(
os.path.abspath(os.path.dirname(__file__)),
'tests/resources/waltersartmuseum'
)
logging.basicConfig(
format='%(asctime)s - %(name)s - %(levelname)s: ... | 0 | 0 | 0 | 0 | 0 | 6,889 | 0 | 16 | 473 |
61df26516d0787ba8bcc1bd61f1621598a533158 | 89 | py | Python | program_files/__init__.py | Vinxenx/SESMG | ca8616ee2b175f949de737890d6f5cd4533f6ee7 | [
"MIT"
] | 13 | 2020-12-01T08:41:40.000Z | 2021-12-01T22:07:12.000Z | program_files/__init__.py | Vinxenx/SESMG | ca8616ee2b175f949de737890d6f5cd4533f6ee7 | [
"MIT"
] | 66 | 2020-08-07T10:34:12.000Z | 2022-03-31T13:07:07.000Z | program_files/__init__.py | Vinxenx/SESMG | ca8616ee2b175f949de737890d6f5cd4533f6ee7 | [
"MIT"
] | 6 | 2020-08-07T10:26:35.000Z | 2022-01-12T09:36:54.000Z | # -*- coding: utf-8 -*-
"""
Created on Tue Jan 14 09:35:53 2020
@author: Christian
"""
| 11.125 | 35 | 0.58427 | # -*- coding: utf-8 -*-
"""
Created on Tue Jan 14 09:35:53 2020
@author: Christian
"""
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
73716934c248a6b00656fef6bc54f715e7c1296c | 12,778 | py | Python | scripts/convert.py | kumasento/deacon | d9bf1adfc93d176930ddc43757eb039714c92657 | [
"MIT"
] | 2 | 2021-04-11T11:01:34.000Z | 2021-04-12T09:18:02.000Z | scripts/convert.py | kumasento/deacon | d9bf1adfc93d176930ddc43757eb039714c92657 | [
"MIT"
] | 3 | 2021-04-10T21:06:42.000Z | 2021-04-10T21:06:42.000Z | scripts/convert.py | kumasento/maxdeep | d9bf1adfc93d176930ddc43757eb039714c92657 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
""" Convert from pre-trained models. """
if __name__ == "__main__":
main()
| 36.824207 | 121 | 0.487792 | #!/usr/bin/env python3
""" Convert from pre-trained models. """
import argparse
import math
import os
import sys
from collections import OrderedDict
from dataclasses import dataclass
from typing import Dict
import numpy as np
import onnx
import toml
from onnx import shape_inference
from pydeacon.graph import (
D... | 0 | 102 | 0 | 11,264 | 0 | 815 | 0 | 106 | 381 |
47312b896ce1ded775eb5694ed034f119703f054 | 3,999 | py | Python | pma_api/utils.py | joeflack4/pma-api | de213833c93ad0c90b127188526c9eced31edc75 | [
"MIT"
] | 2 | 2018-08-24T14:27:25.000Z | 2020-05-11T18:59:24.000Z | pma_api/utils.py | joeflack4/pma-api | de213833c93ad0c90b127188526c9eced31edc75 | [
"MIT"
] | 36 | 2018-07-13T15:49:50.000Z | 2019-07-17T18:29:28.000Z | pma_api/utils.py | joeflack4/pma-api | de213833c93ad0c90b127188526c9eced31edc75 | [
"MIT"
] | 4 | 2018-07-12T19:24:52.000Z | 2021-03-09T16:08:38.000Z | """Assortment of utilities for application."""
import itertools
import operator
import os
import random
from typing import List
from flask_sqlalchemy import Model, SQLAlchemy
from pma_api.app import PmaApiFlask
B64_CHAR_SET = ''.join(('abcdefghijklmnopqrstuvwxyz',
'ABCDEFGHIJKLMNOPQRSTUVWXYZ'... | 23.946108 | 76 | 0.628657 | """Assortment of utilities for application."""
import itertools
import operator
import os
import random
from typing import List
from flask_sqlalchemy import Model, SQLAlchemy
from pma_api.app import PmaApiFlask
B64_CHAR_SET = ''.join(('abcdefghijklmnopqrstuvwxyz',
'ABCDEFGHIJKLMNOPQRSTUVWXYZ'... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
dce593f083f710d9b47b53386014bb2642bc2023 | 1,084 | py | Python | Projects/Online Workouts/w3resource/Basic - Part-I/program-81.py | ivenpoker/Python-Projects | 2975e1bd687ec8dbcc7a4842c13466cb86292679 | [
"MIT"
] | 1 | 2019-09-23T15:51:45.000Z | 2019-09-23T15:51:45.000Z | Projects/Online Workouts/w3resource/Basic - Part-I/program-81.py | ivenpoker/Python-Projects | 2975e1bd687ec8dbcc7a4842c13466cb86292679 | [
"MIT"
] | 5 | 2021-02-08T20:47:19.000Z | 2022-03-12T00:35:44.000Z | Projects/Online Workouts/w3resource/Basic - Part-I/program-81.py | ivenpoker/Python-Projects | 2975e1bd687ec8dbcc7a4842c13466cb86292679 | [
"MIT"
] | null | null | null | # !/usr/bin/env python3
#######################################################################################
# #
# Program purpose: Concatenates N-strings. #
# Program Author : Happi... | 40.148148 | 87 | 0.350554 | # !/usr/bin/env python3
#######################################################################################
# #
# Program purpose: Concatenates N-strings. #
# Program Author : Happi... | 0 | 0 | 0 | 0 | 0 | 188 | 0 | 0 | 23 |
83cdf744bb4105c7bd913cf6fac47cf20ff9faa7 | 1,741 | py | Python | python/test.py | MorenoJoshua/freeswitchManager | b1488f6c9e2a2e3008e758dde46ea9ca22fdec26 | [
"MIT"
] | null | null | null | python/test.py | MorenoJoshua/freeswitchManager | b1488f6c9e2a2e3008e758dde46ea9ca22fdec26 | [
"MIT"
] | null | null | null | python/test.py | MorenoJoshua/freeswitchManager | b1488f6c9e2a2e3008e758dde46ea9ca22fdec26 | [
"MIT"
] | null | null | null | import requests
import hmac
import hashlib
import datetime as dt
import simplejson as json
access_key = '80473469' # example
secret_key = 'GhDzk8Lc00xUzUjHFJqDqLztMNq5KMgU' # example
# Generate the X-Timestamp
t = dt.datetime.utcnow().replace(microsecond=0)
timestamp = t.isoformat()
timestamp = '2015-10-29T14:33:46'
... | 32.240741 | 129 | 0.731189 | import requests
import hmac
import hashlib
import datetime as dt
import simplejson as json
access_key = '80473469' # example
secret_key = 'GhDzk8Lc00xUzUjHFJqDqLztMNq5KMgU' # example
# Generate the X-Timestamp
t = dt.datetime.utcnow().replace(microsecond=0)
timestamp = t.isoformat()
timestamp = '2015-10-29T14:33:46'
... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
366c1976344b76f7e0aa3018661a6d511956da45 | 4,053 | py | Python | oecp/proxy/requests_proxy.py | openeuler-mirror/oecp | 967ed6b9e53f2da5f795f49bb5b5fc0423372863 | [
"MulanPSL-1.0"
] | null | null | null | oecp/proxy/requests_proxy.py | openeuler-mirror/oecp | 967ed6b9e53f2da5f795f49bb5b5fc0423372863 | [
"MulanPSL-1.0"
] | null | null | null | oecp/proxy/requests_proxy.py | openeuler-mirror/oecp | 967ed6b9e53f2da5f795f49bb5b5fc0423372863 | [
"MulanPSL-1.0"
] | null | null | null | # -*- encoding=utf-8 -*-
"""
# **********************************************************************************
# Copyright (c) Huawei Technologies Co., Ltd. 2020-2020. All rights reserved.
# [oecp] is licensed under the Mulan PSL v1.
# You can use this software according to the terms and conditions of the Mulan PSL ... | 30.022222 | 118 | 0.564767 | # -*- encoding=utf-8 -*-
"""
# **********************************************************************************
# Copyright (c) Huawei Technologies Co., Ltd. 2020-2020. All rights reserved.
# [oecp] is licensed under the Mulan PSL v1.
# You can use this software according to the terms and conditions of the Mulan PSL ... | 207 | 0 | 0 | 1,778 | 0 | 0 | 0 | 29 | 143 |
681bb0f26e4f2b6b3ed857eda5a41e22243ccaba | 3,488 | py | Python | angr/procedures/definitions/win32_api-ms-win-wsl-api-l1-1-0.py | r4b3rt/angr | c133cfd4f83ffea2a1d9e064241e9459eaabc55f | [
"BSD-2-Clause"
] | null | null | null | angr/procedures/definitions/win32_api-ms-win-wsl-api-l1-1-0.py | r4b3rt/angr | c133cfd4f83ffea2a1d9e064241e9459eaabc55f | [
"BSD-2-Clause"
] | null | null | null | angr/procedures/definitions/win32_api-ms-win-wsl-api-l1-1-0.py | r4b3rt/angr | c133cfd4f83ffea2a1d9e064241e9459eaabc55f | [
"BSD-2-Clause"
] | null | null | null | # pylint:disable=line-too-long
import logging
from ...sim_type import SimTypeFunction, SimTypeInt, SimTypePointer, SimTypeChar
from ...calling_conventions import SimCCStdcall, SimCCMicrosoftAMD64
from .. import SIM_PROCEDURES as P
from . import SimLibrary
_l = logging.getLogger(name=__name__)
lib = SimLibrary()
li... | 96.888889 | 706 | 0.746273 | # pylint:disable=line-too-long
import logging
from ...sim_type import SimTypeFunction, SimTypeShort, SimTypeInt, SimTypeLong, SimTypeLongLong, SimTypeDouble, SimTypeFloat, SimTypePointer, SimTypeChar, SimStruct, SimTypeFixedSizeArray, SimTypeBottom, SimUnion, SimTypeBool
from ...calling... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 177 | 0 |
2529dc53e5cd9ca70e79a3921134c3237fe3ea48 | 972 | py | Python | scripts/run_iqtree.py | fmalmeida/PopPIPE | 0012ff55c9959f1c7ac359412ca22d9c1948d00c | [
"Apache-2.0"
] | 7 | 2020-05-04T10:16:25.000Z | 2021-05-09T20:22:19.000Z | scripts/run_iqtree.py | fmalmeida/PopPIPE | 0012ff55c9959f1c7ac359412ca22d9c1948d00c | [
"Apache-2.0"
] | 4 | 2020-07-01T09:07:47.000Z | 2021-05-19T12:04:37.000Z | scripts/run_iqtree.py | fmalmeida/PopPIPE | 0012ff55c9959f1c7ac359412ca22d9c1948d00c | [
"Apache-2.0"
] | 2 | 2021-05-09T00:34:29.000Z | 2021-11-21T22:23:17.000Z | import subprocess
import dendropy
from shutil import copyfile
if snakemake.params.enabled:
iqtree_cmd = "iqtree --quiet -s " + snakemake.input.alignment + " -t " + snakemake.input.start_tree + \
" -T " + str(snakemake.threads) + " --prefix " + snakemake.params.prefix
if snakemake.params.mode =... | 42.26087 | 107 | 0.70679 | import subprocess
import dendropy
from shutil import copyfile
if snakemake.params.enabled:
iqtree_cmd = "iqtree --quiet -s " + snakemake.input.alignment + " -t " + snakemake.input.start_tree + \
" -T " + str(snakemake.threads) + " --prefix " + snakemake.params.prefix
if snakemake.params.mode =... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
e407015ffc89e6d1d5d878c1de0fb0517395640a | 213 | py | Python | Python/frequency_counter.py | Gaminee/Data_Structures_and_Algorithms.github.io | f25d368e17dfcbe81079f286012355281af8b390 | [
"Unlicense"
] | 77 | 2020-10-01T10:06:59.000Z | 2021-11-08T08:57:18.000Z | Python/frequency_counter.py | Gaminee/Data_Structures_and_Algorithms.github.io | f25d368e17dfcbe81079f286012355281af8b390 | [
"Unlicense"
] | 64 | 2020-10-01T09:27:58.000Z | 2020-12-02T10:47:01.000Z | Python/frequency_counter.py | Gaminee/Data_Structures_and_Algorithms.github.io | f25d368e17dfcbe81079f286012355281af8b390 | [
"Unlicense"
] | 327 | 2020-09-26T17:06:03.000Z | 2021-10-09T06:04:39.000Z | L = [11,22,66,22,11,44,55,66,88,77,22,11,44,22,33,77,55,44]
print('The given list is: ')
print(L)
D = {}
for item in L:
if item not in D:
D[item] = L.count(item)
print('Frequency of different items is:')
print(D)
| 21.3 | 59 | 0.647887 | L = [11,22,66,22,11,44,55,66,88,77,22,11,44,22,33,77,55,44]
print('The given list is: ')
print(L)
D = {}
for item in L:
if item not in D:
D[item] = L.count(item)
print('Frequency of different items is:')
print(D)
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
180fc1c1d07b42afefb6638e91e474bd5069892e | 5,407 | py | Python | server/datasource/models/candles.py | yizhang7210/Acre | c98cf8a4fdfb223a1958e8e61df759f889a1b13f | [
"MIT"
] | 2 | 2017-11-27T21:55:21.000Z | 2017-12-30T03:34:40.000Z | server/datasource/models/candles.py | yizhang7210/Acre | c98cf8a4fdfb223a1958e8e61df759f889a1b13f | [
"MIT"
] | 30 | 2017-09-06T12:00:08.000Z | 2018-06-20T22:47:46.000Z | server/datasource/models/candles.py | yizhang7210/Acre | c98cf8a4fdfb223a1958e8e61df759f889a1b13f | [
"MIT"
] | 1 | 2021-04-05T13:59:37.000Z | 2021-04-05T13:59:37.000Z | """ Data model and data access methods for Candles.
"""
import pytz
def create_one(**kwargs):
""" Create a Candle object with the given fields.
Args:
Named arguments.
instrument: Instrument object.
start_time: Datetime object. Candle start time.
... | 31.994083 | 79 | 0.62567 | """ Data model and data access methods for Candles.
"""
import pytz
from core.models.instruments import Instrument
from django.db import models
class Candle(models.Model):
""" Candle data model.
"""
# pylint: disable=too-many-instance-attributes
instrument = models.ForeignKey(Instrument, on_delete=mo... | 0 | 0 | 0 | 936 | 0 | 0 | 0 | 32 | 67 |
40e01bc00a83ff41fbf3dca04cf9b0eb07326e3a | 14,663 | py | Python | models/Transformers/BertModel_backup.py | suhasgupta791/mids-w251-final-project | aa1ef80685c6d9b5fc8a444e438078150cc0d96c | [
"Apache-2.0"
] | null | null | null | models/Transformers/BertModel_backup.py | suhasgupta791/mids-w251-final-project | aa1ef80685c6d9b5fc8a444e438078150cc0d96c | [
"Apache-2.0"
] | null | null | null | models/Transformers/BertModel_backup.py | suhasgupta791/mids-w251-final-project | aa1ef80685c6d9b5fc8a444e438078150cc0d96c | [
"Apache-2.0"
] | 1 | 2020-02-14T01:10:43.000Z | 2020-02-14T01:10:43.000Z | #!/usr/bin/env python
# coding: utf-8
import torch
import torch.nn as nn
import torch.utils.data
import warnings
warnings.filterwarnings(action='once')
# Import transformers specific packages
# Import package for data parallelism to train on multi-GPU machines
# Check if cuda is available
# Set the device and empty... | 47.14791 | 156 | 0.613994 | #!/usr/bin/env python
# coding: utf-8
import itertools
import random
import numpy as np
import sys, os
import pandas as pd
import torch
from torchsummary import summary
from torchtext import data
import torch.nn as nn
import torch.utils.data
from torch.utils.data import Dataset, TensorDataset,DataLoader, RandomSample... | 0 | 0 | 0 | 13,243 | 0 | 0 | 0 | 356 | 534 |
e0179e878f7eca8bff86090f5fe6aea6db8c2820 | 25,793 | py | Python | acoular/tbeamform.py | ndimubanzisenga/acoular | c7abace657d2602f9a4e9d2e4e1fabe44ec3927b | [
"BSD-3-Clause"
] | 1 | 2019-08-30T22:45:09.000Z | 2019-08-30T22:45:09.000Z | acoular/tbeamform.py | ndimubanzisenga/acoular | c7abace657d2602f9a4e9d2e4e1fabe44ec3927b | [
"BSD-3-Clause"
] | null | null | null | acoular/tbeamform.py | ndimubanzisenga/acoular | c7abace657d2602f9a4e9d2e4e1fabe44ec3927b | [
"BSD-3-Clause"
] | 1 | 2019-08-30T03:29:09.000Z | 2019-08-30T03:29:09.000Z | # -*- coding: utf-8 -*-
#pylint: disable-msg=E0611, E1101, C0103, R0901, R0902, R0903, R0904, W0232
#------------------------------------------------------------------------------
# Copyright (c) 2007-2014, Acoular Development Team.
#------------------------------------------------------------------------------
"""Impl... | 37.435414 | 91 | 0.541426 | # -*- coding: utf-8 -*-
#pylint: disable-msg=E0611, E1101, C0103, R0901, R0902, R0903, R0904, W0232
#------------------------------------------------------------------------------
# Copyright (c) 2007-2014, Acoular Development Team.
#------------------------------------------------------------------------------
"""Impl... | 0 | 323 | 0 | 23,318 | 0 | 0 | 0 | 221 | 321 |
2aec0d6638ad1f50011ab2d5daffdf486d01bf2e | 774 | py | Python | src/classifier/bin.py | Glavin001/IssueBot | 4dfb31bda009e254b38dc8394669f7debeac65a4 | [
"MIT"
] | 15 | 2016-06-08T02:21:19.000Z | 2019-10-16T19:14:41.000Z | src/classifier/bin.py | Glavin001/IssueBot | 4dfb31bda009e254b38dc8394669f7debeac65a4 | [
"MIT"
] | 23 | 2015-03-15T04:35:33.000Z | 2019-01-18T15:38:31.000Z | src/classifier/bin.py | Glavin001/IssueBot | 4dfb31bda009e254b38dc8394669f7debeac65a4 | [
"MIT"
] | 7 | 2015-06-16T19:35:21.000Z | 2021-08-09T06:13:16.000Z | # Dependencies
import sys, json
import classifier
ignore_labels = ['duplicate', 'in-progress', 'pending-publication', 'published', 'waiting-for-user-information', 'high priority']
# simple JSON echo script
for line in sys.stdin:
payload = json.loads(line)
( action, params ) = payload
results = {}
if a... | 33.652174 | 129 | 0.674419 | # Dependencies
import sys, json
import classifier
ignore_labels = ['duplicate', 'in-progress', 'pending-publication', 'published', 'waiting-for-user-information', 'high priority']
# simple JSON echo script
for line in sys.stdin:
payload = json.loads(line)
( action, params ) = payload
results = {}
if a... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
f48ac06ade6c3699af7d7457c6a52059497ed0d7 | 31,685 | py | Python | data/crud.py | delta-reporter/delta-core | e8fdcf01d3fd246c08fa30bbed84d66a85099167 | [
"Apache-2.0"
] | 1 | 2021-03-12T10:55:48.000Z | 2021-03-12T10:55:48.000Z | data/crud.py | delta-reporter/delta-core | e8fdcf01d3fd246c08fa30bbed84d66a85099167 | [
"Apache-2.0"
] | 29 | 2020-04-20T10:20:20.000Z | 2021-06-04T10:17:17.000Z | data/crud.py | delta-reporter/delta-core | e8fdcf01d3fd246c08fa30bbed84d66a85099167 | [
"Apache-2.0"
] | 3 | 2020-05-25T14:43:47.000Z | 2021-09-02T15:27:31.000Z | import pytz
utc = pytz.UTC
| 33.108673 | 98 | 0.59716 | import models
import datetime
from app import db
from data import constants
from logzero import logger
from sqlalchemy import exc
from sqlalchemy.sql import func
from data.subqueries import TestCounts
import re
import os
import pytz
utc = pytz.UTC
def session_commit():
try:
db.session.commit()
except... | 0 | 29,714 | 0 | -34 | 0 | 128 | 0 | 1 | 1,843 |
746790b2f99b3eeda9ba31ceed4b0eb4232aa515 | 59 | py | Python | settings.py | joevgear/test_rail_util | fb5e6d24798025de47e12499921d533286e64cf8 | [
"MIT"
] | null | null | null | settings.py | joevgear/test_rail_util | fb5e6d24798025de47e12499921d533286e64cf8 | [
"MIT"
] | null | null | null | settings.py | joevgear/test_rail_util | fb5e6d24798025de47e12499921d533286e64cf8 | [
"MIT"
] | null | null | null | TESTRAIL_API_TOKEN = ""
TESTRAIL_URL = ""
TESTRAIL_PWD = "" | 19.666667 | 23 | 0.711864 | TESTRAIL_API_TOKEN = ""
TESTRAIL_URL = ""
TESTRAIL_PWD = "" | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |