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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
30dc1e482d31016e858ff3cb6d935b6a74a5e554 | 5,258 | py | Python | data.py | dyf/ephys | 354d4c24e45573cd881e663354dfdeccfd82afed | [
"MIT"
] | null | null | null | data.py | dyf/ephys | 354d4c24e45573cd881e663354dfdeccfd82afed | [
"MIT"
] | null | null | null | data.py | dyf/ephys | 354d4c24e45573cd881e663354dfdeccfd82afed | [
"MIT"
] | null | null | null | import numpy as np
np.random.seed(1)
if __name__=="__main__": main() | 32.257669 | 122 | 0.568277 | import pandas as pd
import numpy as np
import h5py
import scipy.signal
np.random.seed(1)
def read_sweep(data, sweep_num):
sweep_data = data.get_sweep(sweep_num)
index_range = sweep_data["index_range"]
i = sweep_data["stimulus"][index_range[0]:index_range[1]+1] # in A
v = sweep_data["response"][index... | 0 | 0 | 0 | 1,045 | 0 | 3,888 | 0 | -14 | 263 |
f7624d0fc0611603817897998b15d08bf110b1ec | 3,015 | py | Python | MLLib/NeuralNet/net.py | Tim15/MLib | 2222dc67ec0cbaf07942371120be1690359e0ab3 | [
"MIT"
] | null | null | null | MLLib/NeuralNet/net.py | Tim15/MLib | 2222dc67ec0cbaf07942371120be1690359e0ab3 | [
"MIT"
] | null | null | null | MLLib/NeuralNet/net.py | Tim15/MLib | 2222dc67ec0cbaf07942371120be1690359e0ab3 | [
"MIT"
] | null | null | null | # import curses
# import datetime
#
# stdscr = curses.initscr()
# curses.noecho()
# stdscr.nodelay(1) # set getch() non-blocking
#
# stdscr.addstr(0,0,"Press \"p\" to show count, \"q\" to exit...")
# line = 1
# try:
# while 1:
# c = stdscr.getch()
# if c == ord('p'):
# stdsc... | 41.30137 | 384 | 0.562852 | # import curses
# import datetime
#
# stdscr = curses.initscr()
# curses.noecho()
# stdscr.nodelay(1) # set getch() non-blocking
#
# stdscr.addstr(0,0,"Press \"p\" to show count, \"q\" to exit...")
# line = 1
# try:
# while 1:
# c = stdscr.getch()
# if c == ord('p'):
# stdsc... | 0 | 0 | 0 | 0 | 0 | 76 | 0 | 0 | 23 |
14365edda1d57d32cb18fd672a65dcf7c274b551 | 290 | py | Python | notify/forms.py | MakingL/power_outage_notify | a1d18e5a2ca6fab32ef7cac241dac135aef06709 | [
"MIT"
] | 6 | 2019-10-24T09:22:27.000Z | 2020-12-11T02:12:35.000Z | notify/forms.py | MakingL/power_outage_notify | a1d18e5a2ca6fab32ef7cac241dac135aef06709 | [
"MIT"
] | null | null | null | notify/forms.py | MakingL/power_outage_notify | a1d18e5a2ca6fab32ef7cac241dac135aef06709 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# @Time : 2020/2/16 17:00
# @Author : MLee
# @File : forms.py
| 20.714286 | 39 | 0.648276 | # -*- coding: utf-8 -*-
# @Time : 2020/2/16 17:00
# @Author : MLee
# @File : forms.py
from django.forms import ModelForm
from .models import SubscriberInfoModel
class SubscriberModelForm(ModelForm):
class Meta:
model = SubscriberInfoModel
fields = ["email", ]
| 0 | 0 | 0 | 97 | 0 | 0 | 0 | 31 | 68 |
f1d03e38dfbe4b51ea2ff8497748e3dbd655aeb6 | 12,763 | py | Python | python-impl/curve_ops.py | kwantam/bls_sigs_hash_ref | 0bb331e90e1e434ac3d8bfdf2bd3f32d8a74c434 | [
"Apache-2.0"
] | 2 | 2019-10-24T17:42:26.000Z | 2020-05-30T19:46:37.000Z | python-impl/curve_ops.py | kwantam/bls_sigs_ref-archive | 0bb331e90e1e434ac3d8bfdf2bd3f32d8a74c434 | [
"Apache-2.0"
] | null | null | null | python-impl/curve_ops.py | kwantam/bls_sigs_ref-archive | 0bb331e90e1e434ac3d8bfdf2bd3f32d8a74c434 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
#
# (C) 2019 Riad S. Wahby <rsw@cs.stanford.edu>
#
# pure Python implementation of curve ops for Ell2 on BLS12-381
import sys
from consts import p
from fields import Fq, Fq2
if sys.version_info[0] < 3:
sys.exit("This script requires Python3 or PyPy3")
###
## generators for BLS signatures
###
#... | 33.410995 | 116 | 0.584189 | #!/usr/bin/python
#
# (C) 2019 Riad S. Wahby <rsw@cs.stanford.edu>
#
# pure Python implementation of curve ops for Ell2 on BLS12-381
import sys
from consts import p, q
from fields import Fq, Fq2
if sys.version_info[0] < 3:
sys.exit("This script requires Python3 or PyPy3")
###
## generators for BLS signatures
##... | 0 | 0 | 0 | 0 | 0 | 7,848 | 0 | 3 | 489 |
0cec7381f7a1155dfc55e1bdd6dd7a431871aa5e | 1,745 | py | Python | src/rogers/generated/__init__.py | cylance/rogers | a2300ed518fa01e0f2fcb77f1c10f7124ea7f49a | [
"Apache-2.0"
] | 14 | 2018-03-22T14:55:30.000Z | 2021-01-08T07:23:14.000Z | src/rogers/generated/__init__.py | cylance/rogers | a2300ed518fa01e0f2fcb77f1c10f7124ea7f49a | [
"Apache-2.0"
] | 1 | 2019-01-29T16:03:54.000Z | 2019-01-29T16:03:54.000Z | src/rogers/generated/__init__.py | cylance/rogers | a2300ed518fa01e0f2fcb77f1c10f7124ea7f49a | [
"Apache-2.0"
] | 5 | 2019-01-06T21:58:42.000Z | 2021-12-07T12:02:53.000Z | """ Wrappers for generated PB
"""
from .feature_pb2 import Feature, Value, List, Struct
def feature(val, var_type=Feature.Variable.CATEGORICAL, var_mode=Feature.Modality.STATIC):
""" Create feature message
:param val:
:param var_type:
:param var_mode:
:return:
"""
f = Feature()
f.mode ... | 26.846154 | 90 | 0.617765 | """ Wrappers for generated PB
"""
from .feature_pb2 import Feature, Features, Value, List, Struct
def feature(val, var_type=Feature.Variable.CATEGORICAL, var_mode=Feature.Modality.STATIC):
""" Create feature message
:param val:
:param var_type:
:param var_mode:
:return:
"""
f = Feature()
... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 10 | 0 |
9207be2aeb10ed43909ab11df47c31e994ae7a13 | 16,014 | py | Python | indexer.py | saeenyoda/Inverted_Indexing | 1e0438f4d92090502171e3da2c50742fa6a6f4bd | [
"MIT"
] | null | null | null | indexer.py | saeenyoda/Inverted_Indexing | 1e0438f4d92090502171e3da2c50742fa6a6f4bd | [
"MIT"
] | null | null | null | indexer.py | saeenyoda/Inverted_Indexing | 1e0438f4d92090502171e3da2c50742fa6a6f4bd | [
"MIT"
] | 1 | 2021-06-13T18:11:07.000Z | 2021-06-13T18:11:07.000Z | import os
import platform
from rich import print
from nltk.stem import snowball
SNOWBALL_STEMMER = snowball.SnowballStemmer('english')
STOP_WORDS = None
PATH_SEP = '/' if platform.system().lower() == 'darwin' else "\\"
HITS_JSON = None
# Prints headers of sections
# Prints success msgs
# updates stopwords as wel... | 33.15528 | 111 | 0.60903 | import os
import io
import platform
import json
import nltk
import heapq
import time
from rich.progress import (
TextColumn,
BarColumn,
Progress,
TimeRemainingColumn,
TimeElapsedColumn
)
from rich import print
from rich import box
from rich.panel import Panel
from math import sqrt
from bs4 import Be... | 9 | 0 | 0 | 0 | 0 | 12,450 | 0 | 122 | 660 |
518278a6890c7778aa32bec4304a9f4a8e26f910 | 2,339 | py | Python | examples/other/misc/upload_sd_to_s3.py | CSS-Electronics/api-examples | 0d712c0d321b8acc739a24a97fe6735545fd7b47 | [
"MIT"
] | 43 | 2020-04-05T13:28:13.000Z | 2022-03-23T02:22:19.000Z | examples/other/misc/upload_sd_to_s3.py | CSS-Electronics/api-examples | 0d712c0d321b8acc739a24a97fe6735545fd7b47 | [
"MIT"
] | 12 | 2020-10-08T11:28:07.000Z | 2022-02-13T07:39:46.000Z | examples/other/misc/upload_sd_to_s3.py | CSS-Electronics/api-examples | 0d712c0d321b8acc739a24a97fe6735545fd7b47 | [
"MIT"
] | 12 | 2020-04-05T13:28:18.000Z | 2022-03-04T07:27:23.000Z | # This script can be used for 'manually' uploading CANedge log files from an SD to S3.
# The script includes S3 meta data such as firmware and SD timestamp and correctly derives S3 key.
import mdf_iter
import canedge_browser
from pathlib import Path
import boto3
from botocore.client import Config
from s3transfer impor... | 39.644068 | 126 | 0.718683 | # This script can be used for 'manually' uploading CANedge log files from an SD to S3.
# The script includes S3 meta data such as firmware and SD timestamp and correctly derives S3 key.
import mdf_iter
import canedge_browser
from pathlib import Path
import boto3
from botocore.client import Config
from s3transfer impor... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
acf715fc15a7df7b482387e53afd194b3fbc1f62 | 2,439 | py | Python | venv/lib/python2.7/site-packages/plotnine/stats/stat_quantile.py | nuriale207/preprocesspack | cc06a9cb79c5e3b392371fcd8d1ccf7185e71821 | [
"MIT"
] | null | null | null | venv/lib/python2.7/site-packages/plotnine/stats/stat_quantile.py | nuriale207/preprocesspack | cc06a9cb79c5e3b392371fcd8d1ccf7185e71821 | [
"MIT"
] | null | null | null | venv/lib/python2.7/site-packages/plotnine/stats/stat_quantile.py | nuriale207/preprocesspack | cc06a9cb79c5e3b392371fcd8d1ccf7185e71821 | [
"MIT"
] | null | null | null | from __future__ import absolute_import, division, print_function
# method_args are any of the keyword args (other than q) for
# statsmodels.regression.quantile_regression.QuantReg.fit
| 28.360465 | 72 | 0.604346 | from __future__ import absolute_import, division, print_function
from warnings import warn
import pandas as pd
import statsmodels.formula.api as smf
from ..doctools import document
from .stat import stat
# method_args are any of the keyword args (other than q) for
# statsmodels.regression.quantile_regression.Quant... | 0 | 1,744 | 0 | 0 | 0 | 321 | 0 | 29 | 158 |
fdeee11a9d4e6f3bcd3e97f59d0cc37fc7251253 | 1,650 | py | Python | tests/test_cli.py | RonsenbergVI/cicd_circleci_codeclimate | cc1fdbbaf64700a7cbbd3b9a255f869dae878ae5 | [
"MIT"
] | null | null | null | tests/test_cli.py | RonsenbergVI/cicd_circleci_codeclimate | cc1fdbbaf64700a7cbbd3b9a255f869dae878ae5 | [
"MIT"
] | null | null | null | tests/test_cli.py | RonsenbergVI/cicd_circleci_codeclimate | cc1fdbbaf64700a7cbbd3b9a255f869dae878ae5 | [
"MIT"
] | 1 | 2022-01-31T21:06:09.000Z | 2022-01-31T21:06:09.000Z | # MIT License
# Copyright (c) 2021 Rene Jean Corneille
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, m... | 44.594595 | 104 | 0.719394 | # MIT License
# Copyright (c) 2021 Rene Jean Corneille
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, m... | 0 | 444 | 0 | 0 | 0 | 0 | 0 | 7 | 90 |
c023841435919ac9c7d89803f2385f0005a2221e | 2,437 | py | Python | bot/cogs/weather.py | phantom0174/HSQCC_bot | 93d4b40f7d8885bcf927590926370d67e05a5760 | [
"MIT"
] | 4 | 2020-11-25T16:31:41.000Z | 2021-08-28T21:35:01.000Z | bot/cogs/weather.py | phantom0174/HSQCC_bot | 93d4b40f7d8885bcf927590926370d67e05a5760 | [
"MIT"
] | 12 | 2020-12-21T09:42:13.000Z | 2021-05-16T06:17:49.000Z | bot/cogs/weather.py | phantom0174/HSQCC_bot | 93d4b40f7d8885bcf927590926370d67e05a5760 | [
"MIT"
] | 2 | 2021-04-13T08:28:12.000Z | 2021-07-11T02:41:35.000Z |
# This extension is for school h.w. of phantom0174.
data_prefix = {
"0": "",
"1": "",
"2": "",
"3": "",
"4": ""
}
data_suffix = {
"0": "",
"1": "",
"2": "",
"3": "",
"4": "%"
}
| 29.011905 | 105 | 0.526467 | from discord.ext import commands
import requests
import os
from ..core.cog_config import CogExtension
# This extension is for school h.w. of phantom0174.
data_prefix = {
"0": "天氣描述",
"1": "最高溫度",
"2": "最低溫度",
"3": "體感描述",
"4": "降水機率"
}
data_suffix = {
"0": "",
"1": "度",
"2": "度",
... | 174 | 1,680 | 0 | 298 | 0 | 29 | 0 | 14 | 134 |
e0e797a0958dac033c62740ccb9d3b0c263a6c83 | 2,153 | py | Python | expertise/service/__init__.py | openreview/openreview-expertise | da8a9fc3da25d8deae7023616c51a4ac7b196b67 | [
"MIT"
] | 12 | 2020-02-25T18:45:32.000Z | 2022-02-07T22:24:48.000Z | expertise/service/__init__.py | openreview/openreview-expertise | da8a9fc3da25d8deae7023616c51a4ac7b196b67 | [
"MIT"
] | 52 | 2019-12-19T08:14:43.000Z | 2022-03-23T19:40:02.000Z | expertise/service/__init__.py | openreview/openreview-expertise | da8a9fc3da25d8deae7023616c51a4ac7b196b67 | [
"MIT"
] | 3 | 2019-10-24T16:52:34.000Z | 2021-09-27T21:40:39.000Z | import os
import flask
import logging, logging.handlers
from celery import Celery
def configure_logger(app):
'''
Configures the app's logger object.
'''
app.logger.removeHandler(flask.logging.default_handler)
formatter = logging.Formatter(
'%(asctime)s %(levelname)s: [in %(pathname)s:%(line... | 28.328947 | 93 | 0.686484 | import os
import flask
import logging, logging.handlers
from celery import Celery
def configure_logger(app):
'''
Configures the app's logger object.
'''
app.logger.removeHandler(flask.logging.default_handler)
formatter = logging.Formatter(
'%(asctime)s %(levelname)s: [in %(pathname)s:%(line... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
cd9decb0bfd5fc86725a466a321744abf50f388e | 379 | py | Python | orchester/utils/gen_trello_token.py | popojargo/orchester | 5e6c15400ef73845b03dd2a50331b9e90beb3be6 | [
"MIT"
] | 1 | 2019-02-07T19:39:16.000Z | 2019-02-07T19:39:16.000Z | orchester/utils/gen_trello_token.py | popojargo/orchester | 5e6c15400ef73845b03dd2a50331b9e90beb3be6 | [
"MIT"
] | null | null | null | orchester/utils/gen_trello_token.py | popojargo/orchester | 5e6c15400ef73845b03dd2a50331b9e90beb3be6 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
if __name__ == '__main__':
generate()
| 22.294118 | 59 | 0.693931 | # -*- coding: utf-8 -*-
from trello import util
from orchester.ConfigHelper import get_config_data, pick
def generate():
config = get_config_data()
cfg = pick(config, 'connectors.trello')
api_key = pick(cfg, 'api_key')
api_secret = pick(cfg, 'api_secret')
util.create_oauth_token(key=api_key, secr... | 0 | 0 | 0 | 0 | 0 | 206 | 0 | 37 | 67 |
5efb6e792f4b159ced4f979691541c882fee6400 | 8,395 | py | Python | monai/networks/layers/convutils.py | Can-Zhao/MONAI | e29ef022b97a4e809dd22d4d208005f541ee061b | [
"Apache-2.0"
] | 3 | 2020-06-22T20:59:14.000Z | 2021-04-09T21:24:45.000Z | monai/networks/layers/convutils.py | Borda/MONAI | e0db5a564225a7cb62e7a23df97267019006302f | [
"Apache-2.0"
] | null | null | null | monai/networks/layers/convutils.py | Borda/MONAI | e0db5a564225a7cb62e7a23df97267019006302f | [
"Apache-2.0"
] | 1 | 2020-05-27T12:53:58.000Z | 2020-05-27T12:53:58.000Z | # Copyright (c) MONAI Consortium
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, so... | 36.820175 | 119 | 0.628708 | # Copyright (c) MONAI Consortium
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, so... | 0 | 0 | 0 | 0 | 0 | 2,538 | 0 | 0 | 92 |
18253ccc9eb3c1fe714bc7c37f0316da52829721 | 490 | py | Python | awesomeDP/users/migrations/0004_auto_20210305_2132.py | bentaro/AwesomeDatePlanBackend | d6403e885e190c4e37eeaadca3264f9a79add6f0 | [
"Unlicense"
] | null | null | null | awesomeDP/users/migrations/0004_auto_20210305_2132.py | bentaro/AwesomeDatePlanBackend | d6403e885e190c4e37eeaadca3264f9a79add6f0 | [
"Unlicense"
] | null | null | null | awesomeDP/users/migrations/0004_auto_20210305_2132.py | bentaro/AwesomeDatePlanBackend | d6403e885e190c4e37eeaadca3264f9a79add6f0 | [
"Unlicense"
] | null | null | null | # Generated by Django 3.1.7 on 2021-03-05 21:32
| 24.5 | 145 | 0.642857 | # Generated by Django 3.1.7 on 2021-03-05 21:32
from django.db import migrations, models
import uuid
class Migration(migrations.Migration):
dependencies = [
('users', '0003_auto_20210305_2112'),
]
operations = [
migrations.AlterField(
model_name='user',
name='use... | 0 | 0 | 0 | 364 | 0 | 0 | 0 | 9 | 68 |
983e206989a9e380886c61631f06373eac9cc4ab | 6,746 | py | Python | test/interactioncomponent_test.py | jtoD5T/TinCanPython | e98b5087cb7f3a29c6a00392b327cd6241c4a354 | [
"Apache-2.0"
] | null | null | null | test/interactioncomponent_test.py | jtoD5T/TinCanPython | e98b5087cb7f3a29c6a00392b327cd6241c4a354 | [
"Apache-2.0"
] | null | null | null | test/interactioncomponent_test.py | jtoD5T/TinCanPython | e98b5087cb7f3a29c6a00392b327cd6241c4a354 | [
"Apache-2.0"
] | null | null | null | # Copyright 2014 Rustici Software
#
# 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... | 39.91716 | 117 | 0.679217 | # Copyright 2014 Rustici Software
#
# 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... | 0 | 0 | 0 | 5,782 | 0 | 0 | 0 | 21 | 67 |
624b21844f83da8c355f907105e32fb400816f1f | 800 | py | Python | nltk example/word_net.py | shivendra2102/PythonProgram | e720b8686b00679d757550378a4e4f1160cf5405 | [
"MIT"
] | null | null | null | nltk example/word_net.py | shivendra2102/PythonProgram | e720b8686b00679d757550378a4e4f1160cf5405 | [
"MIT"
] | null | null | null | nltk example/word_net.py | shivendra2102/PythonProgram | e720b8686b00679d757550378a4e4f1160cf5405 | [
"MIT"
] | null | null | null | from nltk.corpus import wordnet
syns = wordnet.synsets("program")
#synsets
print(syns)
print(syns[0].lemmas()[0].name())
#definition
print(syns[0].definition())
#examples
print(syns[0].examples())
synonyms = []
antonyms = []
for syn in wordnet.synsets("good"):
for l in syn.lemmas():
#pr... | 21.621622 | 58 | 0.6225 | from nltk.corpus import wordnet
syns = wordnet.synsets("program")
#synsets
print(syns)
print(syns[0].lemmas()[0].name())
#definition
print(syns[0].definition())
#examples
print(syns[0].examples())
synonyms = []
antonyms = []
for syn in wordnet.synsets("good"):
for l in syn.lemmas():
#p... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
d7674674e637252e8785b8940a237a1a18e0926b | 19,487 | py | Python | launchpad_py/charset.py | kalebolson/launchpad.py | 960bda4463e386d6fbc041d7a1eed132dab29722 | [
"CC-BY-4.0"
] | 301 | 2015-01-17T23:30:43.000Z | 2022-03-30T15:24:34.000Z | launchpad_py/charset.py | kalebolson/launchpad.py | 960bda4463e386d6fbc041d7a1eed132dab29722 | [
"CC-BY-4.0"
] | 75 | 2015-02-12T23:40:09.000Z | 2022-02-26T19:52:47.000Z | launchpad_py/charset.py | kalebolson/launchpad.py | 960bda4463e386d6fbc041d7a1eed132dab29722 | [
"CC-BY-4.0"
] | 74 | 2015-05-06T03:40:02.000Z | 2022-02-15T14:00:48.000Z |
#
# a simple 8x8 font for the Launchpad
#
CHARTAB = [ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, # Char 000 (.)
0x7E, 0x81, 0xA5, 0x81, 0xBD, 0x99, 0x81, 0x7E, # Char 001 (.)
0x7E, 0xFF, 0xDB, 0xFF, 0xC3, 0xE7, 0xFF, 0x7E, # Char 002 (.)
0x6C, 0xFE, 0xFE, 0xFE, 0x7C, 0x38, ... | 74.377863 | 75 | 0.517063 |
#
# a simple 8x8 font for the Launchpad
#
CHARTAB = [ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, # Char 000 (.)
0x7E, 0x81, 0xA5, 0x81, 0xBD, 0x99, 0x81, 0x7E, # Char 001 (.)
0x7E, 0xFF, 0xDB, 0xFF, 0xC3, 0xE7, 0xFF, 0x7E, # Char 002 (.)
0x6C, 0xFE, 0xFE, 0xFE, 0x7C, 0x38, ... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
193febce87cef7e617a7beae8002537108036a03 | 9,267 | py | Python | src/snovault/viewconfigs/searchview.py | lrowe/snovault | acfcac9b62a4d6b2ebb4a2343acadc36b449f0db | [
"MIT"
] | null | null | null | src/snovault/viewconfigs/searchview.py | lrowe/snovault | acfcac9b62a4d6b2ebb4a2343acadc36b449f0db | [
"MIT"
] | null | null | null | src/snovault/viewconfigs/searchview.py | lrowe/snovault | acfcac9b62a4d6b2ebb4a2343acadc36b449f0db | [
"MIT"
] | null | null | null | """
# Search View
Some Desc
## Inheritance
SearchView<-BaseView
### BaseView function dependencies
- _format_facets
"""
| 36.484252 | 145 | 0.546887 | """
# Search View
Some Desc
## Inheritance
SearchView<-BaseView
### BaseView function dependencies
- _format_facets
"""
from urllib.parse import urlencode
from pyramid.httpexceptions import HTTPBadRequest # pylint: disable=import-error
from elasticsearch.helpers import scan # pylint: disable=import-error
from sno... | 0 | 0 | 0 | 8,493 | 0 | 0 | 0 | 430 | 222 |
4c12b14eabac8d36cbc8c811399ab7921847a561 | 49,040 | py | Python | finite_state_transducer/fst.py | svenyan/coursework_114_foundamentals_of_compling | 41b59bbf2f78e690d11819691e8c93f2719256da | [
"MIT"
] | null | null | null | finite_state_transducer/fst.py | svenyan/coursework_114_foundamentals_of_compling | 41b59bbf2f78e690d11819691e8c93f2719256da | [
"MIT"
] | null | null | null | finite_state_transducer/fst.py | svenyan/coursework_114_foundamentals_of_compling | 41b59bbf2f78e690d11819691e8c93f2719256da | [
"MIT"
] | null | null | null | # Natural Language Toolkit: Finite State Transducers
#
# Copyright (C) 2001-2011 NLTK Project
# Author: Edward Loper <edloper@gradient.cis.upenn.edu>
# Steven Bird <sb@csse.unimelb.edu.au>
#
# URL: <http://www.nltk.org/>
# For license information, see LICENSE.TXT
"""
Finite state transducers.
A finite state ... | 40.1638 | 106 | 0.563295 | # Natural Language Toolkit: Finite State Transducers
#
# Copyright (C) 2001-2011 NLTK Project
# Author: Edward Loper <edloper@gradient.cis.upenn.edu>
# Steven Bird <sb@csse.unimelb.edu.au>
#
# URL: <http://www.nltk.org/>
# For license information, see LICENSE.TXT
"""
Finite state transducers.
A finite state ... | 0 | 2,515 | 0 | 41,347 | 0 | 0 | 0 | 23 | 91 |
7373150831de2c1a11269b280e9e1d2e1593af2e | 5,118 | py | Python | data.py | tonyache/Ricci_project | abaa164b2969f9ad5202d1cf1d313f0b159b8ad9 | [
"BSD-3-Clause"
] | null | null | null | data.py | tonyache/Ricci_project | abaa164b2969f9ad5202d1cf1d313f0b159b8ad9 | [
"BSD-3-Clause"
] | null | null | null | data.py | tonyache/Ricci_project | abaa164b2969f9ad5202d1cf1d313f0b159b8ad9 | [
"BSD-3-Clause"
] | null | null | null | """
A few examples of squared distance matrices.
All functions also return pointset if available, None otherwise.
"""
import numpy as np
# import numexpr as ne
from scipy.spatial.distance import cdist
from sklearn import datasets
def noisycircles(n, factor=0.5, noise=0.1):
""" Two noisy concentric circles. """
... | 29.929825 | 80 | 0.613521 | """
A few examples of squared distance matrices.
All functions also return pointset if available, None otherwise.
"""
from numba import jit
import numpy as np
# import numexpr as ne
from scipy.spatial.distance import cdist
from sklearn import datasets
@jit("void(f8[:,:], f8, f8)", nopython=True, nogil=True)
def sym... | 0 | 530 | 0 | 1,378 | 0 | 369 | 0 | 0 | 115 |
2b7ff9a96a445ab3a0814b85b89802f42ce1be47 | 966 | py | Python | Subarrays/MaxSizeSubarraySumEqualsK.py | PK-100/Competitive_Programming | d0863feaaa99462b2999e85dcf115f7a6c08bb8d | [
"MIT"
] | 70 | 2018-06-25T21:20:15.000Z | 2022-03-24T03:55:17.000Z | Hashing/MaxSizeSubarraySumEqualsK.py | An3sha/Competitive_Programming | ee7eadf51939a360d0b004d787ebabda583e92f0 | [
"MIT"
] | 4 | 2018-09-04T13:12:20.000Z | 2021-06-20T08:29:12.000Z | Hashing/MaxSizeSubarraySumEqualsK.py | An3sha/Competitive_Programming | ee7eadf51939a360d0b004d787ebabda583e92f0 | [
"MIT"
] | 24 | 2018-12-26T05:15:32.000Z | 2022-01-23T23:04:54.000Z | """
Given an array nums and a target value k, find the maximum length of a subarray that sums to k. If there isn't one, return 0 instead.
Array 1 -1 5 -2 3
Array -2 -1 2 1
"""
from collections import defaultdict as d
def maxLen(n, arr, p=0):
"""
15 -2 2 -8 1 7 10 23
15 13 15 7 8 15 25 48
max ... | 24.15 | 133 | 0.57971 | """
Given an array nums and a target value k, find the maximum length of a subarray that sums to k. If there isn't one, return 0 instead.
Array 1 -1 5 -2 3
Array -2 -1 2 1
"""
from collections import defaultdict as d
def maxLen(n, arr, p=0):
"""
15 -2 2 -8 1 7 10 23
15 13 15 7 8 15 25 48
max ... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
00e4f9034c27b845cd24250c1469a79fbbb3d9e5 | 10,839 | py | Python | ansible/lib/ansible/modules/core/network/cumulus/cl_img_install.py | kiv-box/kafka | debec1c4bc8c43776070ee447a53b55fef42bd52 | [
"Apache-2.0"
] | null | null | null | ansible/lib/ansible/modules/core/network/cumulus/cl_img_install.py | kiv-box/kafka | debec1c4bc8c43776070ee447a53b55fef42bd52 | [
"Apache-2.0"
] | null | null | null | ansible/lib/ansible/modules/core/network/cumulus/cl_img_install.py | kiv-box/kafka | debec1c4bc8c43776070ee447a53b55fef42bd52 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2016, Cumulus Networks <ce-ceng@cumulusnetworks.com>
#
# This file is part of Ansible
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3... | 34.192429 | 86 | 0.611034 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2016, Cumulus Networks <ce-ceng@cumulusnetworks.com>
#
# This file is part of Ansible
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3... | 0 | 0 | 0 | 0 | 0 | 6,452 | 0 | 15 | 365 |
c3f172756a25af2355453aa92d08c204272a5cc1 | 2,998 | py | Python | src/modules/reportWriter/plotFig1.py | sarahyyx/paper1 | bed24d4e0162641d16eeb0c7f485d942df74a453 | [
"MIT"
] | null | null | null | src/modules/reportWriter/plotFig1.py | sarahyyx/paper1 | bed24d4e0162641d16eeb0c7f485d942df74a453 | [
"MIT"
] | 6 | 2020-01-28T22:45:43.000Z | 2022-02-10T00:09:23.000Z | src/modules/reportWriter/plotFig1.py | sarahyyx/paper1 | bed24d4e0162641d16eeb0c7f485d942df74a453 | [
"MIT"
] | null | null | null | import jsonref
config = jsonref.load(open('../config/config.json'))
logBase = config['logging']['logBase'] + '.modules.reportWriter.reportWriter'
| 28.283019 | 99 | 0.624416 | from logs import logDecorator as lD
import jsonref, pprint
import numpy as np
import matplotlib.pyplot as plt
from psycopg2.sql import SQL, Identifier, Literal
from lib.databaseIO import pgIO
from collections import Counter
from tqdm import tqdm
from multiprocessing import Pool
from time import sleep
config = jsonr... | 0 | 2,514 | 0 | 0 | 0 | 0 | 0 | 89 | 247 |
6e95386d615d05b7ff5b2fbc8319c50cbf67d2e0 | 782 | py | Python | medical_prescription/chat/views/unarchive_message_health_professional_view.py | ristovao/2017.2-Receituario-Medico | 5387eb80dfb354e948abe64f7d8bbe087fc4f136 | [
"MIT"
] | 11 | 2017-09-19T00:29:40.000Z | 2018-04-05T23:52:39.000Z | medical_prescription/chat/views/unarchive_message_health_professional_view.py | ristovao/2017.2-Receituario-Medico | 5387eb80dfb354e948abe64f7d8bbe087fc4f136 | [
"MIT"
] | 271 | 2017-09-09T00:07:28.000Z | 2017-12-07T05:00:45.000Z | medical_prescription/chat/views/unarchive_message_health_professional_view.py | ristovao/2017.2-Receituario-Medico | 5387eb80dfb354e948abe64f7d8bbe087fc4f136 | [
"MIT"
] | 26 | 2017-08-31T20:48:49.000Z | 2018-03-21T15:11:27.000Z | # Django
# Local Django
| 31.28 | 84 | 0.786445 | # Django
from django.views.generic import View
from django.contrib.auth.decorators import login_required
from django.utils.decorators import method_decorator
from django.urls import reverse_lazy
from django.http import HttpResponseRedirect
# Local Django
from user.decorators import is_health_professional
from chat.mod... | 0 | 419 | 0 | 0 | 0 | 0 | 0 | 160 | 177 |
5ffb22141db2fbf7b812c0acdd04918f22a2320f | 3,813 | py | Python | code/Septor.py | mashrafsiddiq/Septor | f2d9a75d50e0fd60b6a86e493afcc1f243e4fc6d | [
"MIT"
] | null | null | null | code/Septor.py | mashrafsiddiq/Septor | f2d9a75d50e0fd60b6a86e493afcc1f243e4fc6d | [
"MIT"
] | null | null | null | code/Septor.py | mashrafsiddiq/Septor | f2d9a75d50e0fd60b6a86e493afcc1f243e4fc6d | [
"MIT"
] | null | null | null | from tensorflow.keras.layers import Flatten
| 38.13 | 112 | 0.589038 | from tensorflow.keras import backend as K
from tensorflow.keras.models import Model
from tensorflow.keras.layers import Permute, Flatten
from tensorflow.keras.layers import MaxPooling2D, MaxPooling1D
from tensorflow.keras.layers import Reshape, Dense, Input, Dropout, Activation, LSTM, Conv2D,\
... | 0 | 0 | 0 | 3,155 | 0 | 0 | 0 | 334 | 275 |
9c43b0b9e6719d71430706648e5ba299017b6560 | 19,852 | py | Python | hacktheback/rest/account/serializers/user.py | hackthevalley/hack-the-back | a418f2d2751656fed76d0b8c95c8e2a060525e78 | [
"MIT"
] | null | null | null | hacktheback/rest/account/serializers/user.py | hackthevalley/hack-the-back | a418f2d2751656fed76d0b8c95c8e2a060525e78 | [
"MIT"
] | null | null | null | hacktheback/rest/account/serializers/user.py | hackthevalley/hack-the-back | a418f2d2751656fed76d0b8c95c8e2a060525e78 | [
"MIT"
] | null | null | null | # The MIT License (MIT)
#
# Copyright (c) 2013-2019 SUNSCRAPERS
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, ... | 32.922056 | 79 | 0.646736 | # The MIT License (MIT)
#
# Copyright (c) 2013-2019 SUNSCRAPERS
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, ... | 0 | 60 | 0 | 16,627 | 0 | 0 | 0 | 690 | 995 |
cb9d7b466d33a1061e292c6b5971bd72af2f58b5 | 247 | py | Python | Coursera/Week.4/Task.18.py | v1nnyb0y/Coursera.BasePython | bbfb3184dc27a4cdb16b087123890991afbc5506 | [
"MIT"
] | null | null | null | Coursera/Week.4/Task.18.py | v1nnyb0y/Coursera.BasePython | bbfb3184dc27a4cdb16b087123890991afbc5506 | [
"MIT"
] | null | null | null | Coursera/Week.4/Task.18.py | v1nnyb0y/Coursera.BasePython | bbfb3184dc27a4cdb16b087123890991afbc5506 | [
"MIT"
] | null | null | null | '''
'''
n = int(input())
k = int(input())
print(soch(n, k))
| 11.761905 | 46 | 0.42915 | '''
Число сочетаний
'''
def soch(n, k):
if (k == 0):
return 1
if (k == 1):
return n
if (n == k):
return 1
return soch(n - 1, k) + soch(n - 1, k - 1)
n = int(input())
k = int(input())
print(soch(n, k))
| 28 | 0 | 0 | 0 | 0 | 146 | 0 | 0 | 23 |
725e82604ca7f08be0d86556166895a17126c75d | 746 | py | Python | pandas/io/api.py | LauraCollard/pandas | b1c3a9031569334cafc4e8d45d35408421f7dea4 | [
"BSD-3-Clause"
] | 5 | 2019-07-26T15:22:41.000Z | 2021-09-28T09:22:17.000Z | pandas/io/api.py | LauraCollard/pandas | b1c3a9031569334cafc4e8d45d35408421f7dea4 | [
"BSD-3-Clause"
] | 16 | 2021-03-19T09:44:52.000Z | 2022-03-12T00:22:14.000Z | pandas/io/api.py | LauraCollard/pandas | b1c3a9031569334cafc4e8d45d35408421f7dea4 | [
"BSD-3-Clause"
] | 9 | 2020-02-05T10:24:12.000Z | 2020-02-10T13:08:50.000Z | """
Data IO api
"""
# flake8: noqa
| 33.909091 | 66 | 0.831099 | """
Data IO api
"""
# flake8: noqa
from pandas.io.clipboards import read_clipboard
from pandas.io.excel import ExcelFile, ExcelWriter, read_excel
from pandas.io.feather_format import read_feather
from pandas.io.gbq import read_gbq
from pandas.io.html import read_html
from pandas.io.json import read_json
from pandas.i... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 379 | 331 |
73cfe4ce742fbf6b798901c51c481e95128ca11a | 24,601 | py | Python | src/network-manager/azext_network_manager/vendored_sdks/operations/_network_management_client_operations.py | Liran-E/azure-cli-extensions | 053f5c511b58f7de16540d68d8aaa61efd232f15 | [
"MIT"
] | 1 | 2022-01-25T07:33:18.000Z | 2022-01-25T07:33:18.000Z | src/network-manager/azext_network_manager/vendored_sdks/operations/_network_management_client_operations.py | Liran-E/azure-cli-extensions | 053f5c511b58f7de16540d68d8aaa61efd232f15 | [
"MIT"
] | null | null | null | src/network-manager/azext_network_manager/vendored_sdks/operations/_network_management_client_operations.py | Liran-E/azure-cli-extensions | 053f5c511b58f7de16540d68d8aaa61efd232f15 | [
"MIT"
] | null | null | null | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 44.892336 | 286 | 0.71363 | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 0 | 13,311 | 0 | 1,456 | 0 | 8,405 | 0 | 217 | 271 |
d4b26cb33e88c6e7c18f854b92d60cc3d7eb8f68 | 64,150 | py | Python | sdk/communication/azure-communication-administration/azure/communication/administration/_phonenumber/_generated/aio/operations_async/_phone_number_administration_operations_async.py | adewaleo/azure-sdk-for-python | 169457edbea5e3c5557246cfcf8bd635d528bae4 | [
"MIT"
] | 1 | 2020-03-05T18:10:35.000Z | 2020-03-05T18:10:35.000Z | sdk/communication/azure-communication-administration/azure/communication/administration/_phonenumber/_generated/aio/operations_async/_phone_number_administration_operations_async.py | adewaleo/azure-sdk-for-python | 169457edbea5e3c5557246cfcf8bd635d528bae4 | [
"MIT"
] | 2 | 2021-11-03T06:10:36.000Z | 2021-12-01T06:29:39.000Z | sdk/communication/azure-communication-administration/azure/communication/administration/_phonenumber/_generated/aio/operations_async/_phone_number_administration_operations_async.py | adewaleo/azure-sdk-for-python | 169457edbea5e3c5557246cfcf8bd635d528bae4 | [
"MIT"
] | 1 | 2021-05-19T02:55:10.000Z | 2021-05-19T02:55:10.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 47.695167 | 202 | 0.653141 | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 0 | 0 | 39,447 | 23,670 | 0 | 0 | 0 | 149 | 90 |
09037e29db25af4952db95f352bddc06083c790f | 1,309 | py | Python | utils.py | ielm/svo_extract | 4f9652734dbaf8ff5ef4ece6b462891bbf8d3e41 | [
"Apache-2.0"
] | null | null | null | utils.py | ielm/svo_extract | 4f9652734dbaf8ff5ef4ece6b462891bbf8d3e41 | [
"Apache-2.0"
] | null | null | null | utils.py | ielm/svo_extract | 4f9652734dbaf8ff5ef4ece6b462891bbf8d3e41 | [
"Apache-2.0"
] | null | null | null |
if __name__ == '__main__':
process_persuasion_data('data/Persuasion/full_dialog.csv') | 24.240741 | 62 | 0.550802 | import os
import pandas as pd
from collections import OrderedDict
def get_all_data_files(base_dir='data'):
data_files = []
for root, _, files in os.walk(base_dir):
for file in files:
filename = [root, file]
data_files.append(filename)
return data_files
def process_persu... | 2 | 0 | 0 | 0 | 0 | 1,100 | 0 | 0 | 114 |
5de43b8ca0e7c938fafe40a03aea6a5b27119a47 | 7,902 | py | Python | rnn_train.py | Jackingotn/Projekt | 45e9705a3d1986ffaf48dfe1afb477ec2092094f | [
"Apache-2.0"
] | null | null | null | rnn_train.py | Jackingotn/Projekt | 45e9705a3d1986ffaf48dfe1afb477ec2092094f | [
"Apache-2.0"
] | null | null | null | rnn_train.py | Jackingotn/Projekt | 45e9705a3d1986ffaf48dfe1afb477ec2092094f | [
"Apache-2.0"
] | null | null | null |
import tensorflow as tf
from tensorflow.contrib import layers
from tensorflow.contrib import rnn # rnn stuff temporarily in contrib, moving back to code in TF 1.1
import os
import time
import math
import numpy as np
import my_txtutils as txt
tf.set_random_seed(0)
start = time.time()
#
SEQLEN = 50
B... | 46.482353 | 118 | 0.690838 |
import tensorflow as tf
from tensorflow.contrib import layers
from tensorflow.contrib import rnn # rnn stuff temporarily in contrib, moving back to code in TF 1.1
import os
import time
import math
import numpy as np
import my_txtutils as txt
tf.set_random_seed(0)
start = time.time()
#
SEQLEN = 50
B... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
ef9d17ff4a756a294e3fc13117f7570cac1cdf54 | 2,086 | py | Python | run.py | HuangLuGuang/PDFRecognition | ece93c3e2b51f0e6dcc68964d3b25e470086589d | [
"MIT"
] | 6 | 2020-07-30T03:27:59.000Z | 2020-07-30T05:02:33.000Z | run.py | HuangLuGuang/PDFRecognition | ece93c3e2b51f0e6dcc68964d3b25e470086589d | [
"MIT"
] | null | null | null | run.py | HuangLuGuang/PDFRecognition | ece93c3e2b51f0e6dcc68964d3b25e470086589d | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# @createTime : 2020/5/20 9:34
# @author : Huanglg
# @fileName: file_change.py
# @email: luguang.huang@mabotech.com
import time
from watchdog.observers import Observer
import config
from utils.Logger import Logger
logger = Logger()
if __name__ == "__main__":
monitor_dir = config.MONI... | 29.8 | 91 | 0.643816 | # -*- coding: utf-8 -*-
# @createTime : 2020/5/20 9:34
# @author : Huanglg
# @fileName: file_change.py
# @email: luguang.huang@mabotech.com
import time
from watchdog.observers import Observer
from watchdog.events import *
import config
from parse_pdf import parse_pdf
import os
import constants
from utils.Logger ... | 162 | 0 | 0 | 1,317 | 0 | 0 | 0 | 1 | 112 |
064af3102bf8e9d94e662ec6072eb7ba73266630 | 2,811 | py | Python | rgf_grape/independent_spins/optim.py | SamBoutin/majorana-rgf-grape | 3233627125519a3cc36b1d167c00d39b54abc48d | [
"BSD-2-Clause"
] | null | null | null | rgf_grape/independent_spins/optim.py | SamBoutin/majorana-rgf-grape | 3233627125519a3cc36b1d167c00d39b54abc48d | [
"BSD-2-Clause"
] | null | null | null | rgf_grape/independent_spins/optim.py | SamBoutin/majorana-rgf-grape | 3233627125519a3cc36b1d167c00d39b54abc48d | [
"BSD-2-Clause"
] | null | null | null | """
This file is part of the rgf_grape python package.
Copyright (C) 2017-2018 S. Boutin
For details of the rgf_grape algorithm and applications see:
S. Boutin, J. Camirand Lemyre, and I. Garate, Majorana bound state engineering
via efficient real-space parameter optimization, ArXiv 1804.03170 (2018).
"""
| 35.1375 | 79 | 0.670224 | """
This file is part of the rgf_grape python package.
Copyright (C) 2017-2018 S. Boutin
For details of the rgf_grape algorithm and applications see:
S. Boutin, J. Camirand Lemyre, and I. Garate, Majorana bound state engineering
via efficient real-space parameter optimization, ArXiv 1804.03170 (2018).
"""
import rgf_... | 0 | 0 | 0 | 0 | 0 | 2,291 | 0 | 49 | 159 |
945fcd0c83ccf4a7ac4ae658d8620ed6abb8bd2d | 7,135 | py | Python | dot_weechat/python/urlbuf.py | benmezger/new-dotfiles | 5aa41015bd017d0e4cc39edf374ca73e8c25b8cb | [
"MIT"
] | 68 | 2016-09-28T12:51:20.000Z | 2022-02-25T15:33:16.000Z | dot_weechat/python/urlbuf.py | benmezger/new-dotfiles | 5aa41015bd017d0e4cc39edf374ca73e8c25b8cb | [
"MIT"
] | null | null | null | dot_weechat/python/urlbuf.py | benmezger/new-dotfiles | 5aa41015bd017d0e4cc39edf374ca73e8c25b8cb | [
"MIT"
] | 2 | 2016-09-28T12:51:28.000Z | 2022-01-11T10:26:44.000Z | # -*- coding: utf-8 -*-
# Copyright (c) 2011-2014 by Jani Kesnen <jani.kesanen@gmail.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option)... | 37.751323 | 106 | 0.660547 | # -*- coding: utf-8 -*-
# Copyright (c) 2011-2014 by Jani Kesänen <jani.kesanen@gmail.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option... | 8 | 0 | 0 | 0 | 0 | 85 | 0 | 0 | 23 |
c21fac3df0193f2967e4b94137fb68c135baf3b8 | 1,303 | py | Python | samples/metrics/tests.py | simonsdave/tor-async-couchdb | 286b0acaca636f5e937b159d56db573973cd17a1 | [
"MIT"
] | 1 | 2019-01-27T21:07:14.000Z | 2019-01-27T21:07:14.000Z | samples/metrics/tests.py | simonsdave/tor-async-couchdb | 286b0acaca636f5e937b159d56db573973cd17a1 | [
"MIT"
] | 5 | 2015-04-22T17:52:07.000Z | 2017-05-16T01:56:45.000Z | samples/metrics/tests.py | simonsdave/tor-async-couchdb | 286b0acaca636f5e937b159d56db573973cd17a1 | [
"MIT"
] | 2 | 2015-05-04T20:19:46.000Z | 2016-05-30T09:59:59.000Z | """This file contains a series of integration tests that sanity check
a sample metrics service running on http://127.0.0.1:8445
"""
_base_url = 'http://service:8445/v1.0/_metrics'
| 26.06 | 82 | 0.487337 | """This file contains a series of integration tests that sanity check
a sample metrics service running on http://127.0.0.1:8445
"""
import httplib
import unittest
import requests
_base_url = 'http://service:8445/v1.0/_metrics'
class TheTestCase(unittest.TestCase):
def _keys_from_dict(self, d):
rv = {}... | 0 | 0 | 0 | 1,049 | 0 | 0 | 0 | -19 | 91 |
dec59269a1884344706c2f5e0aff086f7383c173 | 4,398 | py | Python | src/boogie/testing/crawler.py | pencil-labs/django-boogie | 79b759617785ce33a24cb6013266a0810b24801c | [
"BSD-3-Clause"
] | null | null | null | src/boogie/testing/crawler.py | pencil-labs/django-boogie | 79b759617785ce33a24cb6013266a0810b24801c | [
"BSD-3-Clause"
] | null | null | null | src/boogie/testing/crawler.py | pencil-labs/django-boogie | 79b759617785ce33a24cb6013266a0810b24801c | [
"BSD-3-Clause"
] | 2 | 2021-09-16T22:11:35.000Z | 2021-09-25T12:28:27.000Z | import re
from collections import deque
from django.test.client import Client
# Utility functions
cte = lambda x: lambda *args: x
choose = lambda cond, do, other: do if cond else other
def crawl(url="/", skip_patterns=(), skip_urls=(), errors=(), user=None, log=print):
"""
Crawl website starting from the gi... | 29.918367 | 84 | 0.597999 | import re
import sys
from collections import deque
from html.parser import HTMLParser
from django.test.client import Client
# Utility functions
cte = lambda x: lambda *args: x
choose = lambda cond, do, other: do if cond else other
def crawl(url="/", skip_patterns=(), skip_urls=(), errors=(), user=None, log=print):
... | 0 | 0 | 0 | 728 | 0 | 0 | 0 | 2 | 66 |
7d2d2198a7cc07ba660a2d2a67b827449b3f4b63 | 1,978 | py | Python | src/tools/bin/send_mail.py | aherbert/omero-archiving | ce52a63215ea9b75a50d35ee9690fe37ee74794a | [
"0BSD"
] | 1 | 2021-07-08T11:03:34.000Z | 2021-07-08T11:03:34.000Z | src/tools/bin/send_mail.py | aherbert/omero-archiving | ce52a63215ea9b75a50d35ee9690fe37ee74794a | [
"0BSD"
] | 1 | 2022-01-20T12:24:43.000Z | 2022-01-20T17:48:01.000Z | src/tools/bin/send_mail.py | aherbert/omero-archiving | ce52a63215ea9b75a50d35ee9690fe37ee74794a | [
"0BSD"
] | null | null | null | #!/usr/bin/python3
# -*- coding: utf-8 -*-
# ------------------------------------------------------------------------------
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted.
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANT... | 30.90625 | 80 | 0.650657 | #!/usr/bin/python3
# -*- coding: utf-8 -*-
# ------------------------------------------------------------------------------
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted.
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANT... | 0 | 0 | 0 | 0 | 0 | 712 | 0 | 12 | 155 |
271ae1116dc1cee3b8f3e8915c82797545547b26 | 467 | py | Python | constclust/utils.py | ivirshup/constclust | 6b7ef2773a3332beccd1de8774b16f3727321510 | [
"MIT"
] | 10 | 2019-04-09T03:26:45.000Z | 2021-07-29T17:07:13.000Z | constclust/utils.py | ivirshup/constclust | 6b7ef2773a3332beccd1de8774b16f3727321510 | [
"MIT"
] | 4 | 2020-06-06T06:12:40.000Z | 2021-02-11T08:00:25.000Z | constclust/utils.py | ivirshup/constclust | 6b7ef2773a3332beccd1de8774b16f3727321510 | [
"MIT"
] | null | null | null | import pandas as pd
def reverse_series_map(series):
"""Reverse a mapping"""
return pd.Series(series.index.values, index=series.values)
| 20.304348 | 62 | 0.550321 | import pandas as pd
import numpy as np
def reverse_series_map(series):
"""Reverse a mapping"""
return pd.Series(series.index.values, index=series.values)
def pairs_to_dict(pairs):
cur = next(pairs)
curfirst = cur[0]
l = [cur[1]]
d = {curfirst: l}
for cur in pairs:
if curfirst != ... | 0 | 0 | 0 | 0 | 0 | 279 | 0 | -3 | 45 |
8b3c6e301a2bfe4184eaebfe81d9e514d826c7a6 | 3,547 | py | Python | migrations/helpers/mlwh_samples_update_helper.py | JamesGlover/crawler | 877bae3b4f88690748d304b6543ccb260f43bb68 | [
"MIT"
] | null | null | null | migrations/helpers/mlwh_samples_update_helper.py | JamesGlover/crawler | 877bae3b4f88690748d304b6543ccb260f43bb68 | [
"MIT"
] | null | null | null | migrations/helpers/mlwh_samples_update_helper.py | JamesGlover/crawler | 877bae3b4f88690748d304b6543ccb260f43bb68 | [
"MIT"
] | null | null | null | import logging
| 34.77451 | 112 | 0.661686 | import logging
import logging.config
import time
from typing import List
import pymongo
import sys
import traceback
from crawler.constants import (
COLLECTION_SAMPLES,
FIELD_CREATED_AT,
MONGO_DATETIME_FORMAT,
)
from crawler.db import (
create_mongo_client,
get_mongo_collection,
get_mongo_db,
... | 0 | 0 | 0 | 0 | 0 | 2,953 | 0 | 268 | 311 |
450a952469d38fab0777cdf4cf72fe4d4c3806a5 | 488 | py | Python | config.py | Kiback732/backend | 2ebae9f5a30b18eecbab32a0a312887a843be374 | [
"MIT"
] | null | null | null | config.py | Kiback732/backend | 2ebae9f5a30b18eecbab32a0a312887a843be374 | [
"MIT"
] | null | null | null | config.py | Kiback732/backend | 2ebae9f5a30b18eecbab32a0a312887a843be374 | [
"MIT"
] | null | null | null | import os
basedir = os.path.abspath(os.path.dirname(__file__))
| 34.857143 | 108 | 0.721311 | import os
basedir = os.path.abspath(os.path.dirname(__file__))
class Config(object):
DEVELOPMENT = True
DEBUG = True
SECRET_KEY = os.environ.get('SECRET_KEY') or '123456789'
SQLALCHEMY_DATABASE_URI = os.environ.get('POSTGRESQL_URL') or 'postgresql://worker:worker@localhost/app'
SQLALCHEMY_TRACK_MO... | 0 | 0 | 0 | 402 | 0 | 0 | 0 | 0 | 23 |
b986581a75d6e77342ffb7d23b1f42458660eb4b | 16,025 | py | Python | source/result/file_3_7.py | lintongtong123/JackokiePapers | 65a4be9c9b636c7c3d0c4ab24096572a737480c7 | [
"MIT"
] | null | null | null | source/result/file_3_7.py | lintongtong123/JackokiePapers | 65a4be9c9b636c7c3d0c4ab24096572a737480c7 | [
"MIT"
] | null | null | null | source/result/file_3_7.py | lintongtong123/JackokiePapers | 65a4be9c9b636c7c3d0c4ab24096572a737480c7 | [
"MIT"
] | 1 | 2019-09-24T01:32:44.000Z | 2019-09-24T01:32:44.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time : 2018/3/11 15:23
# @Author : Jackokie Zhao
# @Site : www.jackokie.com
# @File : file_3_7.py
# @Software: PyCharm
# @contact: jackokie@gmail.com
import pickle
import numpy as np
import tensorflow as tf
import matplotlib
matplotlib.use('agg')
import matpl... | 35.065646 | 117 | 0.641685 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time : 2018/3/11 15:23
# @Author : Jackokie Zhao
# @Site : www.jackokie.com
# @File : file_3_7.py
# @Software: PyCharm
# @contact: jackokie@gmail.com
import os
import pickle
import numpy as np
import tensorflow as tf
import matplotlib
from sklearn.manifold im... | 90 | 0 | 0 | 0 | 0 | 4,325 | 0 | 0 | 91 |
078fe6a1cf5862634bb0c53902668f2d955de0a8 | 490 | py | Python | microtubulepkg/microtubulepkg/__init__.py | liuvictoria/sleepingbeauty | e165bea614d58ddd2c5c2a860df622241065cf47 | [
"MIT"
] | null | null | null | microtubulepkg/microtubulepkg/__init__.py | liuvictoria/sleepingbeauty | e165bea614d58ddd2c5c2a860df622241065cf47 | [
"MIT"
] | null | null | null | microtubulepkg/microtubulepkg/__init__.py | liuvictoria/sleepingbeauty | e165bea614d58ddd2c5c2a860df622241065cf47 | [
"MIT"
] | null | null | null | """Microtubule catastrophe time and concentration analyses"""
__author__ = 'Victoria Liu'
__email__ = 'vliu@caltech.edu'
__version__ = '0.0.1'
| 24.5 | 61 | 0.795918 | """Microtubule catastrophe time and concentration analyses"""
from .tidy_data import *
from .ecdfs import *
from .controls import *
from .parameter_estimates import *
from .viz_controls import *
from .viz_explore_two_arrival_story import *
from .viz_parameter_estimates import *
from .viz_explore_concentration_datse... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 122 | 223 |
7dcf3ad17c81c5a0612aae877a9ef43ab17b3af4 | 6,611 | py | Python | scripts/chalfHLS/adderHLS_roundOFF/script.py | dicecco1/fpga_caffe | 7a191704efd7873071cfef35772d7e7bf3e3cfd6 | [
"Intel",
"BSD-2-Clause"
] | 134 | 2016-10-05T22:10:19.000Z | 2022-03-26T07:13:55.000Z | scripts/chalfHLS/adderHLS_roundOFF/script.py | honorpeter/fpga_caffe | 7a191704efd7873071cfef35772d7e7bf3e3cfd6 | [
"Intel",
"BSD-2-Clause"
] | 14 | 2016-11-20T21:16:38.000Z | 2020-04-14T04:58:32.000Z | scripts/chalfHLS/adderHLS_roundOFF/script.py | honorpeter/fpga_caffe | 7a191704efd7873071cfef35772d7e7bf3e3cfd6 | [
"Intel",
"BSD-2-Clause"
] | 58 | 2016-10-03T01:23:47.000Z | 2021-11-24T12:17:30.000Z | import subprocess
import os
from shutil import copyfile
import matplotlib.pyplot as plt
import csv
report_list = []
exp_4 = []
exp_5 = []
exp_6 = []
exp_7 = []
# change range here to specify testing range for exponent and mentissa. eg. (4,8) stands for [4,8)
for exponent in range (4,8):
for mentisa in range (2,15):
... | 34.432292 | 351 | 0.650885 | import subprocess
import os
from shutil import copyfile
import numpy as np
import matplotlib.pyplot as plt
import csv
import sys
class report:
def __init__(self, CLB, LUT, FF, DSP, BRAM, SRL, EXP, MEN, CP_required, CP_achieved_post_synthesis, CP_achieved_post_implementation):
self.CLB = CLB
self.LUT = LUT
self.... | 0 | 0 | 0 | 432 | 0 | 0 | 0 | -14 | 67 |
4faed980386c5a54f35bc6f3fae965635f77f107 | 1,231 | py | Python | html/atom.py | adein/HTML | 089196da470f0bfbe805a0328335735c82e6a412 | [
"MIT"
] | 1 | 2016-12-31T12:59:26.000Z | 2016-12-31T12:59:26.000Z | html/atom.py | adein/HTML | 089196da470f0bfbe805a0328335735c82e6a412 | [
"MIT"
] | null | null | null | html/atom.py | adein/HTML | 089196da470f0bfbe805a0328335735c82e6a412 | [
"MIT"
] | null | null | null | """This module provides an HTML tag class."""
# Imports
| 27.355556 | 74 | 0.595451 | """This module provides an HTML tag class."""
# Imports
class Tag(object):
"""Describes an HTML tag.
Attributes:
name: The name/type of a tag. e.g., 'table'.
attributes: A list of attribute tuples.
data: The content of the Tag.
parent: The parent of the Tag.
children:... | 0 | 0 | 0 | 1,149 | 0 | 0 | 0 | 0 | 23 |
7cec78baefd745634eda9cc87677292bf9bc6f45 | 879 | py | Python | look_vec.py | sanubhav77/Gaze-Estimation | d85b8f1306cefaf8b2bb2d873bf7daf8a9778dca | [
"MIT"
] | 7 | 2019-12-11T15:38:09.000Z | 2021-06-03T11:09:04.000Z | look_vec.py | sanubhav77/Gaze-Estimation | d85b8f1306cefaf8b2bb2d873bf7daf8a9778dca | [
"MIT"
] | 1 | 2020-05-04T11:38:29.000Z | 2020-05-04T11:38:29.000Z | look_vec.py | sanubhav77/Gaze-Estimation | d85b8f1306cefaf8b2bb2d873bf7daf8a9778dca | [
"MIT"
] | 5 | 2019-12-13T09:38:41.000Z | 2021-11-01T10:24:40.000Z | import matplotlib.pyplot as plt
import numpy as np
import json
if __name__ == '__main__':
with open('sample_preds.json', 'r', encoding="utf-8") as file:
data = json.load(file)
for i in range(10):
item = data[i]
x, y, z = item['out']['look_vec'][0], item['out']['look_vec'][1], item['ou... | 26.636364 | 100 | 0.527873 | import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
import numpy as np
import json
if __name__ == '__main__':
with open('sample_preds.json', 'r', encoding="utf-8") as file:
data = json.load(file)
for i in range(10):
item = data[i]
x, y, z = item['out']['look_vec'][... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 18 | 22 |
b9ab721a127fa4fa529e0a401a684be23866f7dc | 8,737 | py | Python | mmdet/models/backbones/resnextDy.py | HAOCHENYE/yehc_mmdet | 491cc13c6ff769996b7a23b871b10f9a5a1c56fa | [
"Apache-2.0"
] | 1 | 2021-12-25T13:22:39.000Z | 2021-12-25T13:22:39.000Z | mmdet/models/backbones/resnextDy.py | HAOCHENYE/yehc_mmdet | 491cc13c6ff769996b7a23b871b10f9a5a1c56fa | [
"Apache-2.0"
] | null | null | null | mmdet/models/backbones/resnextDy.py | HAOCHENYE/yehc_mmdet | 491cc13c6ff769996b7a23b871b10f9a5a1c56fa | [
"Apache-2.0"
] | 1 | 2021-02-01T13:33:26.000Z | 2021-02-01T13:33:26.000Z | import torch.nn as nn
| 34.128906 | 89 | 0.570333 | import math
from mmcv.cnn import build_conv_layer, build_norm_layer
from ..builder import BACKBONES
from ..utils import ResLayer
from .resnet import Bottleneck as _Bottleneck
from .resnet import ResNet
import torch
import torch.nn as nn
import torch.utils.checkpoint as cp
class DyReLU(nn.Module):
def __init__(s... | 0 | 1,989 | 0 | 6,355 | 0 | 0 | 0 | 75 | 294 |
26cb716928f29c953089e0281879920c86b414a9 | 605 | py | Python | src/rooms/migrations/0020_auto_20190704_1921.py | Bounty1993/my-blog | 973ed2046fbb37489fea7caeeebcea5f88cf3fa6 | [
"MIT"
] | null | null | null | src/rooms/migrations/0020_auto_20190704_1921.py | Bounty1993/my-blog | 973ed2046fbb37489fea7caeeebcea5f88cf3fa6 | [
"MIT"
] | null | null | null | src/rooms/migrations/0020_auto_20190704_1921.py | Bounty1993/my-blog | 973ed2046fbb37489fea7caeeebcea5f88cf3fa6 | [
"MIT"
] | null | null | null | # Generated by Django 2.2 on 2019-07-04 19:21
| 23.269231 | 85 | 0.593388 | # Generated by Django 2.2 on 2019-07-04 19:21
import datetime
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('rooms', '0019_auto_20190703_1840'),
]
operations = [
migrations.AddField(
model_name='room',
name='cr... | 0 | 0 | 0 | 476 | 0 | 0 | 0 | 13 | 69 |
53c1cdbf8dd9c433a8ef2a6f4c4992fd65601736 | 784 | py | Python | alphazero/othello/train.py | bhansconnect/alphazero-general | 374d8796496a4a8c8efe504f8ab93195a29a2ee5 | [
"MIT"
] | null | null | null | alphazero/othello/train.py | bhansconnect/alphazero-general | 374d8796496a4a8c8efe504f8ab93195a29a2ee5 | [
"MIT"
] | null | null | null | alphazero/othello/train.py | bhansconnect/alphazero-general | 374d8796496a4a8c8efe504f8ab93195a29a2ee5 | [
"MIT"
] | null | null | null | import pyximport; pyximport.install()
from alphazero.Coach import Coach, get_args
from alphazero.NNetWrapper import NNetWrapper as nn
from alphazero.othello.OthelloGame import OthelloGame as Game
from alphazero.othello.OthelloPlayers import GreedyOthelloPlayer
args = get_args(
run_name='othello',
cpuct=2,
... | 23.757576 | 64 | 0.730867 | import pyximport; pyximport.install()
from alphazero.Coach import Coach, get_args
from alphazero.NNetWrapper import NNetWrapper as nn
from alphazero.othello.OthelloGame import OthelloGame as Game
from alphazero.othello.OthelloPlayers import GreedyOthelloPlayer
args = get_args(
run_name='othello',
cpuct=2,
... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
56f777bd751ac8721482fe22e0fbd12a47820581 | 2,452 | py | Python | HPCnet/hpcnet_utils.py | Linxius/HPCnet | 689057cd3ec206e187fd3ac01fb3ae8ae41110ed | [
"MIT"
] | 1 | 2019-11-13T04:41:54.000Z | 2019-11-13T04:41:54.000Z | HPCnet/hpcnet_utils.py | Linxius/HPCnet | 689057cd3ec206e187fd3ac01fb3ae8ae41110ed | [
"MIT"
] | null | null | null | HPCnet/hpcnet_utils.py | Linxius/HPCnet | 689057cd3ec206e187fd3ac01fb3ae8ae41110ed | [
"MIT"
] | 2 | 2019-11-13T04:59:12.000Z | 2019-11-13T08:34:04.000Z | import torch.nn as nn
| 43.017544 | 118 | 0.581974 | import torch
from torch.autograd import Variable
from torch.autograd import Function
import torch.nn as nn
from typing import Tuple
import pointnet2_cuda as pointnet2
from HPCnet.getGtFeature import get_gt_feature
from pointnet2.pointnet2_utils import ball_query, grouping_operation
class HPC_Group(nn.Module):
d... | 0 | 0 | 0 | 2,143 | 0 | 0 | 0 | 107 | 179 |
eb41e7ff73c13eb563ae66c0e6aa3bb7cbdb2e5b | 281 | py | Python | tests/__init__.py | althonos/zbox | ec2ba6e32f677e3cfd9ebb5b1a037684787be415 | [
"MIT"
] | null | null | null | tests/__init__.py | althonos/zbox | ec2ba6e32f677e3cfd9ebb5b1a037684787be415 | [
"MIT"
] | null | null | null | tests/__init__.py | althonos/zbox | ec2ba6e32f677e3cfd9ebb5b1a037684787be415 | [
"MIT"
] | null | null | null | # coding: utf-8
from __future__ import absolute_import
import os
import sys
sys.path.append(os.path.abspath(os.path.join(__file__, "..", "..")))
sys.path.append(os.path.abspath(os.path.join(__file__, "..", "..", "build", "lib")))
| 23.416667 | 84 | 0.697509 | # coding: utf-8
from __future__ import absolute_import
import os
import sys
sys.path.append(os.path.abspath(os.path.join(__file__, "..", "..")))
sys.path.append(os.path.abspath(os.path.join(__file__, "..", "..", "build", "lib")))
from . import test_file
from . import test_repo
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4 | 45 |
a7907d18b3a26c0579f9f41dcda03502f76c62d0 | 284 | py | Python | frontend.py | FelipeCaue/sentiment_analysis | fa958b204a541622d2a1c86dfb1ebaf7b84ed092 | [
"MIT"
] | null | null | null | frontend.py | FelipeCaue/sentiment_analysis | fa958b204a541622d2a1c86dfb1ebaf7b84ed092 | [
"MIT"
] | null | null | null | frontend.py | FelipeCaue/sentiment_analysis | fa958b204a541622d2a1c86dfb1ebaf7b84ed092 | [
"MIT"
] | null | null | null | import streamlit as st
import requests
from utils.io_utils import load_config
config = load_config()
st.title("Sentiment Analysis")
text = st.text_input("Insert a text")
if text:
response = requests.get(config["api"]["url"], params={"text": text})
st.write(response.json()) | 23.666667 | 72 | 0.721831 | import streamlit as st
import requests
from utils.io_utils import load_config
config = load_config()
st.title("Sentiment Analysis")
text = st.text_input("Insert a text")
if text:
response = requests.get(config["api"]["url"], params={"text": text})
st.write(response.json()) | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
bed0ba005f6727036f40b418c4aa5afab57c1256 | 878 | py | Python | androtoolbox/commandline/update_shared_pref.py | gregthedoe/androtoolbox | c98a11c03f388af711837849b9f86966be15685a | [
"MIT"
] | null | null | null | androtoolbox/commandline/update_shared_pref.py | gregthedoe/androtoolbox | c98a11c03f388af711837849b9f86966be15685a | [
"MIT"
] | null | null | null | androtoolbox/commandline/update_shared_pref.py | gregthedoe/androtoolbox | c98a11c03f388af711837849b9f86966be15685a | [
"MIT"
] | null | null | null | #!/usr/bin/env python
if __name__ == '__main__':
main()
| 33.769231 | 117 | 0.750569 | #!/usr/bin/env python
import argparse
from androtoolbox.shared_pref import SharedPref
def update_shared_pref(package, pref_name, updates):
shared_pref = SharedPref.from_device(package, pref_name)
shared_pref.update(updates)
shared_pref.to_device(package, pref_name)
def main():
description = "Update... | 0 | 0 | 0 | 0 | 0 | 703 | 0 | 20 | 91 |
b58b5838189cedda398e9ccafc48cdd7494177dc | 1,155 | py | Python | traverse_invoke/leaves/adapt/adapt_demo.py | danlkv/traverse-invoke | a65236c19852229ad422c707759466750e7c6139 | [
"MIT"
] | null | null | null | traverse_invoke/leaves/adapt/adapt_demo.py | danlkv/traverse-invoke | a65236c19852229ad422c707759466750e7c6139 | [
"MIT"
] | null | null | null | traverse_invoke/leaves/adapt/adapt_demo.py | danlkv/traverse-invoke | a65236c19852229ad422c707759466750e7c6139 | [
"MIT"
] | null | null | null | """
This is demonstrative implementation of how to use
`traverse invoke` for implementation of its parts
"""
from .adapt import get_args, filter_dict
# ## ## ## ## ## This is demonstrative stuff ######
def wrap(retkey):
"""
This decorator writes output of decorated function
to config variable ``retkey``
... | 22.211538 | 54 | 0.621645 | """
This is demonstrative implementation of how to use
`traverse invoke` for implementation of its parts
"""
from .core import entry_traverse
from .adapt import get_args, filter_dict
from traverse_invoke.leaves import kwarg
# ## ## ## ## ## This is demonstrative stuff ######
def wrap(retkey):
"""
This decorat... | 0 | 93 | 0 | 0 | 0 | 394 | 0 | 30 | 139 |
d9a51dc823e5609efe44be6313bfa362177ab2c9 | 765 | py | Python | uno/parser/data_formatter.py | elbow-jason/Uno | 4ad07d7b84e5b6e3e2b2c89db69448906f24b4e4 | [
"MIT"
] | null | null | null | uno/parser/data_formatter.py | elbow-jason/Uno | 4ad07d7b84e5b6e3e2b2c89db69448906f24b4e4 | [
"MIT"
] | 3 | 2015-11-09T19:25:22.000Z | 2016-06-07T15:02:03.000Z | uno/parser/data_formatter.py | elbow-jason/Uno | 4ad07d7b84e5b6e3e2b2c89db69448906f24b4e4 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
| 23.90625 | 62 | 0.546405 | # -*- coding: utf-8 -*-
class DataFormatter(object):
def __init__(self, parent_obj):
self.parent = parent_obj
self.prep_funcs = {}
def css(self, info):
info['data']['stack'] = info['stack']
return info['data']
def element(self, info):
varname = info['data']+'_'+... | 0 | 0 | 0 | 717 | 0 | 0 | 0 | 0 | 23 |
93733fd422faf9864a64ea3871e93d8416c5016c | 2,315 | py | Python | framework/denoising_ae.py | mullachv/causal_notes | 509e1f5c9f793697949a3a6f6bfc53df85e7e9f6 | [
"Apache-2.0"
] | null | null | null | framework/denoising_ae.py | mullachv/causal_notes | 509e1f5c9f793697949a3a6f6bfc53df85e7e9f6 | [
"Apache-2.0"
] | null | null | null | framework/denoising_ae.py | mullachv/causal_notes | 509e1f5c9f793697949a3a6f6bfc53df85e7e9f6 | [
"Apache-2.0"
] | null | null | null | from keras.models import Model, Input
from keras.layers import Conv2D, MaxPooling2D, UpSampling2D
input_img = Input(shape=(28, 28, 1)) #adapt this if using 'channels_first' image data format
x = Conv2D(16, (3,3), activation='relu', padding='same')(input_img)
x = MaxPooling2D((2,2), padding='same')(x)
x = Conv2D(8, (3,... | 35.615385 | 92 | 0.716631 | from keras.models import Model, Input
from keras.layers import Conv2D, MaxPooling2D, UpSampling2D
input_img = Input(shape=(28, 28, 1)) #adapt this if using 'channels_first' image data format
x = Conv2D(16, (3,3), activation='relu', padding='same')(input_img)
x = MaxPooling2D((2,2), padding='same')(x)
x = Conv2D(8, (3,... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
bbab49c0b434c15386e83c23f5d47ddeeb11552d | 2,942 | py | Python | stdlib2-src/dist-packages/reportbug/tempfiles.py | ch1huizong/Scode | c34fb9d0f9b73fe199ba370f2e3ffb30b8f70895 | [
"MIT"
] | null | null | null | stdlib2-src/dist-packages/reportbug/tempfiles.py | ch1huizong/Scode | c34fb9d0f9b73fe199ba370f2e3ffb30b8f70895 | [
"MIT"
] | null | null | null | stdlib2-src/dist-packages/reportbug/tempfiles.py | ch1huizong/Scode | c34fb9d0f9b73fe199ba370f2e3ffb30b8f70895 | [
"MIT"
] | null | null | null | #
# tempfiles module - Temporary file handling for reportbug
# Written by Chris Lawrence <lawrencc@debian.org>
# (C) 1999-2008 Chris Lawrence
# Copyright (C) 2008-2014 Sandro Tosi <morph@debian.org>
#
# This program is freely distributable per the following license:
#
## Permission to use, copy, modify, and dist... | 33.05618 | 76 | 0.683549 | #
# tempfiles module - Temporary file handling for reportbug
# Written by Chris Lawrence <lawrencc@debian.org>
# (C) 1999-2008 Chris Lawrence
# Copyright (C) 2008-2014 Sandro Tosi <morph@debian.org>
#
# This program is freely distributable per the following license:
#
## Permission to use, copy, modify, and dist... | 0 | 0 | 0 | 0 | 0 | 813 | 0 | -16 | 111 |
a3008a62c6eb001a110dd05b38bde4b6d5807fa7 | 1,267 | py | Python | tests/records/test_request_numberseq.py | Pineirin/invenio-requests | 7eb85365128e4189e4c81d154e8918b09aae033d | [
"MIT"
] | null | null | null | tests/records/test_request_numberseq.py | Pineirin/invenio-requests | 7eb85365128e4189e4c81d154e8918b09aae033d | [
"MIT"
] | 87 | 2021-11-08T12:58:56.000Z | 2022-03-29T08:52:48.000Z | tests/records/test_request_numberseq.py | Pineirin/invenio-requests | 7eb85365128e4189e4c81d154e8918b09aae033d | [
"MIT"
] | 10 | 2021-11-04T19:15:37.000Z | 2022-02-21T09:27:07.000Z | # -*- coding: utf-8 -*-
#
# Copyright (C) 2021 CERN.
# Copyright (C) 2021 Northwestern University.
# Copyright (C) 2021 TU Wien.
#
# Invenio-Requests is free software; you can redistribute it and/or modify it
# under the terms of the MIT License; see LICENSE file for more details.
"""Request number identifier model te... | 30.166667 | 77 | 0.696133 | # -*- coding: utf-8 -*-
#
# Copyright (C) 2021 CERN.
# Copyright (C) 2021 Northwestern University.
# Copyright (C) 2021 TU Wien.
#
# Invenio-Requests is free software; you can redistribute it and/or modify it
# under the terms of the MIT License; see LICENSE file for more details.
"""Request number identifier model te... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
82d1d026a48ba1eda96f2974a8ae1957554f0fe9 | 350 | py | Python | tests/test__primitives.py | pvk-developer/MLBlocks | e804508faf55136040cb749a8559cc8383d885e6 | [
"MIT"
] | null | null | null | tests/test__primitives.py | pvk-developer/MLBlocks | e804508faf55136040cb749a8559cc8383d885e6 | [
"MIT"
] | null | null | null | tests/test__primitives.py | pvk-developer/MLBlocks | e804508faf55136040cb749a8559cc8383d885e6 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
| 20.588235 | 68 | 0.714286 | # -*- coding: utf-8 -*-
import os
from mock import patch
from mlblocks import primitives
@patch('mlblocks.primitives._PRIMITIVES_PATHS', new=['a', 'b'])
def test_add_primitives_path():
primitives.add_primitives_path('tests')
expected_path = os.path.abspath('tests')
assert primitives._PRIMITIVES_PATHS... | 0 | 234 | 0 | 0 | 0 | 0 | 0 | -1 | 92 |
d908a6ba948a8f8c7d71e74b372e121a7335bc26 | 4,379 | py | Python | diagnosis.py | ElsevierSoftwareX/SOFTX-D-21-00183 | bef6481ea69445a773bc72ce3c9a7d5fbf82e834 | [
"MIT"
] | 1 | 2021-08-24T12:11:34.000Z | 2021-08-24T12:11:34.000Z | diagnosis.py | ElsevierSoftwareX/SOFTX-D-21-00183 | bef6481ea69445a773bc72ce3c9a7d5fbf82e834 | [
"MIT"
] | null | null | null | diagnosis.py | ElsevierSoftwareX/SOFTX-D-21-00183 | bef6481ea69445a773bc72ce3c9a7d5fbf82e834 | [
"MIT"
] | 2 | 2022-02-02T23:49:52.000Z | 2022-03-13T21:05:15.000Z | from math import isclose
import csv
if __name__ == '__main__':
y = []
with open('test_loss.csv', 'r') as f:
reader = csv.reader(f)
for row in reader:
y.append(float(row[2]))
d = diagnosis()
res = d.smooth(y)
up = []
down = []
for e in range(int(len(res) - 1)... | 33.684615 | 120 | 0.509934 | from math import isclose
import csv
import matplotlib.pyplot as plt
class diagnosis:
def __init__(self):
self.issues = []
self.epsilon_1 = 0.35
self.epsilon_2 = 0.45
self.weight = 0.6
def reset_diagnosis(self):
self.issues = []
def setting_overfitting_tollerance(s... | 0 | 0 | 0 | 3,787 | 0 | 0 | 0 | 10 | 45 |
4e23d593adaff6d57dbb246ab573b661fa7868df | 8,443 | py | Python | ngVLA/test2.py | teuben/QAC | 7ec92dcdfdeb1b71dd13bd6fd47f29b634b7a488 | [
"MIT"
] | 1 | 2019-10-12T03:31:49.000Z | 2019-10-12T03:31:49.000Z | ngVLA/test2.py | lizhangscience/QAC | cd8d7573b49d3c2cc4442c711287450f89c278ea | [
"MIT"
] | 9 | 2018-03-08T03:48:28.000Z | 2020-11-18T21:47:56.000Z | ngVLA/test2.py | lizhangscience/QAC | cd8d7573b49d3c2cc4442c711287450f89c278ea | [
"MIT"
] | 2 | 2019-01-20T15:37:15.000Z | 2019-08-15T07:58:13.000Z | """
ngVLA simulated observation of input galaxy model
feathering INT with 45 and 18 m single dish for TP
Variable Description Default value Notes
--------------------------------------------------------------------------------
model input model model0
imsize_m mod... | 37.691964 | 141 | 0.656046 | """
ngVLA simulated observation of input galaxy model
feathering INT with 45 and 18 m single dish for TP
Variable Description Default value Notes
--------------------------------------------------------------------------------
model input model model0
imsize_m mod... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
09bc86ee836da34faa68b902d27e4a63a60840a1 | 594 | py | Python | idiomfinder/validator/__init__.py | davidygs/idiom-finder-service | b8e37e5c12cdf3a7788527e601df6eff1a66a326 | [
"MIT"
] | null | null | null | idiomfinder/validator/__init__.py | davidygs/idiom-finder-service | b8e37e5c12cdf3a7788527e601df6eff1a66a326 | [
"MIT"
] | null | null | null | idiomfinder/validator/__init__.py | davidygs/idiom-finder-service | b8e37e5c12cdf3a7788527e601df6eff1a66a326 | [
"MIT"
] | null | null | null |
IDIOM_PACKAGE = 'idiomfinder.validator'
IDIOM_FILE = 'data/idioms.3w.txt'
| 27 | 99 | 0.686869 | import pkgutil
from sanic.log import logger
IDIOM_PACKAGE = 'idiomfinder.validator'
IDIOM_FILE = 'data/idioms.3w.txt'
class IdiomValidator:
"""
IdiomValidator examines a given string to see if it is a Chinese idiom. It does so by searching
against a list of known idioms.
"""
def __init__(self):... | 0 | 0 | 0 | 450 | 0 | 0 | 0 | 0 | 68 |
680cd10d14759a44885128410c90eb2cfcf513c2 | 102 | py | Python | robot/Cumulus/resources/locators_46.py | thombehrens/Cumulus | 282e623e9134ed1d20a81ea051e98657fa272e50 | [
"BSD-3-Clause"
] | null | null | null | robot/Cumulus/resources/locators_46.py | thombehrens/Cumulus | 282e623e9134ed1d20a81ea051e98657fa272e50 | [
"BSD-3-Clause"
] | null | null | null | robot/Cumulus/resources/locators_46.py | thombehrens/Cumulus | 282e623e9134ed1d20a81ea051e98657fa272e50 | [
"BSD-3-Clause"
] | null | null | null | """Locators for Summer '19"""
npsp_lex_locators = npsp_lex_locators.copy() | 20.4 | 44 | 0.764706 | """Locators for Summer '19"""
from locators_47 import *
npsp_lex_locators = npsp_lex_locators.copy() | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4 | 23 |
a91e1b5f05f553d328086a8fa62223417904e812 | 1,993 | py | Python | app/account/tests/factories.py | rogeriopaulos/gep | e56fd0450bdb8f572e2e35cc59a74ab0f0b372e2 | [
"MIT"
] | null | null | null | app/account/tests/factories.py | rogeriopaulos/gep | e56fd0450bdb8f572e2e35cc59a74ab0f0b372e2 | [
"MIT"
] | 2 | 2021-09-02T04:22:45.000Z | 2021-09-02T04:52:26.000Z | app/account/tests/factories.py | rogeriopaulos/gep | e56fd0450bdb8f572e2e35cc59a74ab0f0b372e2 | [
"MIT"
] | 1 | 2021-09-15T02:16:38.000Z | 2021-09-15T02:16:38.000Z | from django.contrib.auth import get_user_model
User = get_user_model()
| 29.308824 | 106 | 0.696939 | from random import choice
from account.models import Cargo, Orgao, Profile
from account.utils import CARGOS, INSTITUICOES
from django.contrib.auth import get_user_model
from django.db.models.signals import post_save
from factory import DjangoModelFactory, Faker, Sequence, SubFactory, django
User = get_user_model()
... | 0 | 1,334 | 0 | 245 | 0 | 0 | 0 | 135 | 203 |
b1889e9f50f444b20ee0fad7eb0a09d800ddd5ea | 694 | py | Python | universal_computation/datasets/helpers/annotations.py | jasonjewik/universal-computation | e3ed93c970e918826395b80695bed6677d66f819 | [
"MIT"
] | null | null | null | universal_computation/datasets/helpers/annotations.py | jasonjewik/universal-computation | e3ed93c970e918826395b80695bed6677d66f819 | [
"MIT"
] | null | null | null | universal_computation/datasets/helpers/annotations.py | jasonjewik/universal-computation | e3ed93c970e918826395b80695bed6677d66f819 | [
"MIT"
] | null | null | null | import pandas as pd
import os
data = 'data/2750'
df = pd.DataFrame(columns=['label', 'int_label', 'img_name'])
labels_dict = {}
counter = 0
for subdir in os.listdir(data):
labels_dict[subdir] = counter
filepath = os.path.join(data,subdir)
if os.path.isdir(filepath):
for file in os.listdir(filepath... | 28.916667 | 88 | 0.675793 | import pandas as pd
import os
import pathlib
from pathlib import Path
data = 'data/2750'
df = pd.DataFrame(columns=['label', 'int_label', 'img_name'])
labels_dict = {}
counter = 0
for subdir in os.listdir(data):
labels_dict[subdir] = counter
filepath = os.path.join(data,subdir)
if os.path.isdir(filepath):... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | -4 | 44 |
025f7792b212427f09460648d68263764bb88a7f | 16,551 | py | Python | src/visualise_network.py | WilsonGroupOxford/Network-Monte-Carlo | f535b4daadd3a2e64a8840eca7e75618b8e8c1ac | [
"MIT"
] | null | null | null | src/visualise_network.py | WilsonGroupOxford/Network-Monte-Carlo | f535b4daadd3a2e64a8840eca7e75618b8e8c1ac | [
"MIT"
] | null | null | null | src/visualise_network.py | WilsonGroupOxford/Network-Monte-Carlo | f535b4daadd3a2e64a8840eca7e75618b8e8c1ac | [
"MIT"
] | 1 | 2021-08-06T10:18:11.000Z | 2021-08-06T10:18:11.000Z | import matplotlib.pylab as pylab
main()
| 36.861915 | 104 | 0.487886 | import numpy as np
import sys
import matplotlib.pyplot as plt
from matplotlib.patches import Polygon
from matplotlib.collections import PatchCollection
from matplotlib import cm
from matplotlib.colors import ListedColormap, LinearSegmentedColormap, Normalize
import matplotlib.pylab as pylab
class Network:
def __i... | 0 | 0 | 0 | 12,836 | 0 | 3,342 | 0 | 105 | 223 |
23b9bd9500e0618a286de290677513c151a3c930 | 4,336 | py | Python | MMIST_handwrite.py | sabersword/CNN | 60a830d21eb95279ef05b3f70bf684a578f5f132 | [
"Apache-2.0"
] | null | null | null | MMIST_handwrite.py | sabersword/CNN | 60a830d21eb95279ef05b3f70bf684a578f5f132 | [
"Apache-2.0"
] | null | null | null | MMIST_handwrite.py | sabersword/CNN | 60a830d21eb95279ef05b3f70bf684a578f5f132 | [
"Apache-2.0"
] | null | null | null | # load MNIST data
from tensorflow.examples.tutorials.mnist import input_data
mnist = input_data.read_data_sets("MNIST_data/", one_hot=True)
# start tensorflow interactiveSession
import tensorflow as tf
sess = tf.InteractiveSession()
# weight initialization
# tf.truncated_normal(shape, mean=0.0, stddev=1.0, dtype=tf.f... | 37.059829 | 190 | 0.751153 | # load MNIST data
from tensorflow.examples.tutorials.mnist import input_data
mnist = input_data.read_data_sets("MNIST_data/", one_hot=True)
# start tensorflow interactiveSession
import tensorflow as tf
sess = tf.InteractiveSession()
# weight initialization
# tf.truncated_normal(shape, mean=0.0, stddev=1.0, dtype=tf.f... | 1,962 | 0 | 0 | 0 | 0 | 330 | 0 | 0 | 89 |
f2f56836be5a2cbbaf62be0f039b0682e9b2a88e | 2,028 | py | Python | Leetcode/705#_Design hashset_06123901.py | Maddiezheng/MyLearningNote | aec12ad3936bbdd377500256b9cf7628c16c3dc7 | [
"MIT"
] | null | null | null | Leetcode/705#_Design hashset_06123901.py | Maddiezheng/MyLearningNote | aec12ad3936bbdd377500256b9cf7628c16c3dc7 | [
"MIT"
] | null | null | null | Leetcode/705#_Design hashset_06123901.py | Maddiezheng/MyLearningNote | aec12ad3936bbdd377500256b9cf7628c16c3dc7 | [
"MIT"
] | 1 | 2019-10-23T08:30:57.000Z | 2019-10-23T08:30:57.000Z |
# Your MyHashSet object will be instantiated and called as such:
# obj = MyHashSet()
# obj.add(key)
# obj.remove(key)
# param_3 = obj.contains(key)
| 31.2 | 101 | 0.475838 | class Node:
def __init__(self,val):
self.val = val
self.next = None
class MyHashSet:
def __init__(self,size=1000):
"""
Initialize your data structure here.
"""
self.size = size
self.hash = [None]*self.size #每一個hashset都是鏈表
def add(self... | 555 | 0 | 0 | 1,622 | 0 | 0 | 0 | 0 | 53 |
9572e49eafcacea259f02a85c2b4f743776a8719 | 3,794 | py | Python | src/processing/QC.py | jchylik/how-to-joanne | b13f916fba6e997640ac5a71ae4a57033cc59054 | [
"MIT"
] | null | null | null | src/processing/QC.py | jchylik/how-to-joanne | b13f916fba6e997640ac5a71ae4a57033cc59054 | [
"MIT"
] | null | null | null | src/processing/QC.py | jchylik/how-to-joanne | b13f916fba6e997640ac5a71ae4a57033cc59054 | [
"MIT"
] | null | null | null | # Python file to run QC over ASPEN-processed files and output "good" sondes for input to Level-3
import os
import pandas as pd
import xarray as xr
import joanne
from joanne.Level_2 import fn_2 as f2
Platform = 'HALO'
data_dir = 'extra/Sample_Data/20200122/HALO/'
qc_directory = f"{data_dir}QC/"
a_dir = f"{data_dir}L... | 26.71831 | 96 | 0.66816 | # Python file to run QC over ASPEN-processed files and output "good" sondes for input to Level-3
import datetime
import glob
import os
import sys
import warnings
import numpy as np
import pandas as pd
import xarray as xr
import joanne
from joanne.Level_2 import fn_2 as f2
Platform = 'HALO'
def get_all_sondes_list(... | 0 | 0 | 0 | 0 | 0 | 1,183 | 0 | -36 | 135 |
7064bb8b8cb510c6bb101420a36a0a79c2129efd | 3,696 | py | Python | tools/scoring/score/dimensions/entity_connection_identification.py | samkenxstream/digitalbuildings | 59ca7adeccf762810349927b44bc8f2bbeafa65b | [
"Apache-2.0"
] | null | null | null | tools/scoring/score/dimensions/entity_connection_identification.py | samkenxstream/digitalbuildings | 59ca7adeccf762810349927b44bc8f2bbeafa65b | [
"Apache-2.0"
] | 1 | 2021-10-22T02:32:33.000Z | 2021-10-22T02:32:33.000Z | tools/scoring/score/dimensions/entity_connection_identification.py | josephedwardchang/digitalbuildings | cf412172fa8577392cf0447511589fbbb6792809 | [
"Apache-2.0"
] | null | null | null | # Copyright 2022 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the License);
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, sof... | 38.905263 | 75 | 0.734307 | # Copyright 2022 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the License);
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, sof... | 0 | 817 | 0 | 1,963 | 0 | 0 | 0 | 105 | 113 |
68f953894d8bcd14c406a74cbb1ca96606f070e8 | 3,765 | py | Python | auth0_login/aws/console.py | virgilwashere/auth0-login | 51e07f028ead84d4e3da799309b591efd2008893 | [
"Apache-2.0"
] | null | null | null | auth0_login/aws/console.py | virgilwashere/auth0-login | 51e07f028ead84d4e3da799309b591efd2008893 | [
"Apache-2.0"
] | 1 | 2019-07-01T09:36:58.000Z | 2019-07-01T09:36:58.000Z | auth0_login/aws/console.py | virgilwashere/auth0-login | 51e07f028ead84d4e3da799309b591efd2008893 | [
"Apache-2.0"
] | null | null | null | #
# Copyright 2019 - binx.io B.V.
#
# 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 writ... | 36.553398 | 75 | 0.634529 | #
# Copyright 2019 - binx.io B.V.
#
# 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 writ... | 0 | 535 | 0 | 0 | 0 | 0 | 0 | -9 | 45 |
b87dcffc4f261cd40f2981945e35021e2880e6dc | 3,025 | py | Python | day_09/test_stream_processor.py | anglerud/advent_of_code_2017 | eff27d43cd9eb7c60271887c80cb88f1ae50c48d | [
"MIT"
] | 3 | 2017-12-06T21:23:19.000Z | 2020-04-12T09:49:53.000Z | day_09/test_stream_processor.py | anglerud/advent_of_code_2017 | eff27d43cd9eb7c60271887c80cb88f1ae50c48d | [
"MIT"
] | null | null | null | day_09/test_stream_processor.py | anglerud/advent_of_code_2017 | eff27d43cd9eb7c60271887c80cb88f1ae50c48d | [
"MIT"
] | null | null | null | # coding: utf-8
"""
"""
import stream_processor as sp
from stream_processor import Token as tk
TOKEN_EXAMPLES = (
(r'<', [tk.START_GARBAGE]),
(r'>', [tk.END_GARBAGE]),
(r'c', [tk.CHARACTER]),
(r'!c', [tk.ESCAPE, tk.CHARACTER]),
(r'{c', [tk.START_GROUP, tk.CHARACTER]),
(r'}', [tk.END_GROUP]),
... | 25 | 69 | 0.559339 | # coding: utf-8
"""
"""
import pytest
import stream_processor as sp
from stream_processor import Token as tk
TOKEN_EXAMPLES = (
(r'<', [tk.START_GARBAGE]),
(r'>', [tk.END_GARBAGE]),
(r'c', [tk.CHARACTER]),
(r'!c', [tk.ESCAPE, tk.CHARACTER]),
(r'{c', [tk.START_GROUP, tk.CHARACTER]),
(r'}', [tk... | 0 | 1,388 | 0 | 0 | 0 | 0 | 0 | -8 | 160 |
925734e46f7fbf08c628ce0bec76d2be3fe31539 | 1,669 | py | Python | main.py | JerryPopi/python_project | 9c4252e5c738871027a149e5e848a274a8c6b4d2 | [
"MIT"
] | null | null | null | main.py | JerryPopi/python_project | 9c4252e5c738871027a149e5e848a274a8c6b4d2 | [
"MIT"
] | null | null | null | main.py | JerryPopi/python_project | 9c4252e5c738871027a149e5e848a274a8c6b4d2 | [
"MIT"
] | null | null | null | import pygame
SPEED = 1
SPEED_BALL = SPEED
BLACK = (0, 0, 0)
WHITE = (255, 255, 255)
screen_size = (800, 640)
pygame.init()
screen = pygame.display.set_mode(screen_size, pygame.RESIZABLE)
pygame.display.set_caption("Pong")
ball = Ball(20)
ball.set_pos((screen_size[0] - ball.width) / 2,
(screen_size[1] - ball.w... | 24.188406 | 99 | 0.682445 | import pygame
from pygame.locals import *
from src.classes import *
SPEED = 1
SPEED_BALL = SPEED
BLACK = (0, 0, 0)
WHITE = (255, 255, 255)
screen_size = (800, 640)
pygame.init()
screen = pygame.display.set_mode(screen_size, pygame.RESIZABLE)
pygame.display.set_caption("Pong")
ball = Ball(20)
ball.set_pos((screen_si... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 10 | 44 |
c9767622dc4856bb2624ffc0ce9cccd27f403b09 | 58,563 | py | Python | bpmfwfft/grids.py | jimtufts/bpmfwfft | 091d2269b122f00b9dd8a01e34303e3e946f8ea0 | [
"MIT"
] | null | null | null | bpmfwfft/grids.py | jimtufts/bpmfwfft | 091d2269b122f00b9dd8a01e34303e3e946f8ea0 | [
"MIT"
] | null | null | null | bpmfwfft/grids.py | jimtufts/bpmfwfft | 091d2269b122f00b9dd8a01e34303e3e946f8ea0 | [
"MIT"
] | null | null | null |
from __future__ import print_function
import os
import numpy as np
import netCDF4
try:
from bpmfwfft import IO
try:
from bpmfwfft.util import c_is_in_grid, cdistance, c_containing_cube
from bpmfwfft.util import c_cal_charge_grid_new
from bpmfwfft.util import c_cal_potential_g... | 44.131876 | 166 | 0.601728 |
from __future__ import print_function
import os
import re
import concurrent.futures
import numpy as np
import netCDF4
from mdtraj.geometry import _geometry
from mdtraj.geometry.sasa import _ATOMIC_RADII
try:
from bpmfwfft import IO
try:
from bpmfwfft.util import c_is_in_grid, cdistance, c_co... | 0 | 0 | 0 | 51,997 | 0 | 0 | 0 | 90 | 262 |
16fa5dd935ae5eb25fa5ea9754f26b7b15a1442a | 1,453 | py | Python | map_maker.py | bfakhri/dml_custom | 1e908b10890df11e510d72c21f3125e3069a0eac | [
"CC-BY-4.0"
] | null | null | null | map_maker.py | bfakhri/dml_custom | 1e908b10890df11e510d72c21f3125e3069a0eac | [
"CC-BY-4.0"
] | null | null | null | map_maker.py | bfakhri/dml_custom | 1e908b10890df11e510d72c21f3125e3069a0eac | [
"CC-BY-4.0"
] | null | null | null |
# This makes a map for use in the lau game scripts
#print(make_map(100,200,['A','F','L','S']*80))
#print([str(list(make_map()))])
m = make_map()
for i in range(m.shape[0]):
for j in range(m.shape[1]):
print(m[i,j], end='')
| 29.06 | 66 | 0.619408 | import numpy as np
from random import shuffle
# This makes a map for use in the lau game scripts
def make_map(width=10,length=20,obstacles=['F','L']*32):
num_blanks = width*length - len(obstacles)
obstacles += [' ']*num_blanks
shuffle(obstacles)
# Add goal row
goal_row = [' ']*(width-1)+['G']
... | 0 | 0 | 0 | 0 | 0 | 1,145 | 0 | 2 | 67 |
1b25f1a3b2a28fe52574e457d0a47d877e5765fc | 1,127 | py | Python | tests/test_day5.py | miguellobato84/aoc2021 | c7651c7b273b513ed9399b6bcdc212655e481e98 | [
"MIT"
] | null | null | null | tests/test_day5.py | miguellobato84/aoc2021 | c7651c7b273b513ed9399b6bcdc212655e481e98 | [
"MIT"
] | null | null | null | tests/test_day5.py | miguellobato84/aoc2021 | c7651c7b273b513ed9399b6bcdc212655e481e98 | [
"MIT"
] | null | null | null |
__author__ = "Miguel . Lobato"
__copyright__ = "Miguel . Lobato"
__license__ = "MIT"
| 28.175 | 76 | 0.604259 | import pytest
from aoc.day5 import ex1, ex2
import numpy as np
__author__ = "Miguel Á. Lobato"
__copyright__ = "Miguel Á. Lobato"
__license__ = "MIT"
def parse_input(lines):
import re
pattern = re.compile('(\d+),(\d+) -> (\d+),(\d+)')
return [[int(n) for n in m.groups()] for m in map(pattern.match, lin... | 4 | 0 | 0 | 0 | 0 | 904 | 0 | -3 | 136 |
398ad5d49d0b74c899115d1913a8e89f2090c308 | 371 | py | Python | unbfeelings/config/files.py | UnbFeelings/UnbFeelings_api | 73c725113bc89ae4754a68f958eeaae6da85876e | [
"MIT"
] | 1 | 2018-03-18T21:06:00.000Z | 2018-03-18T21:06:00.000Z | unbfeelings/config/files.py | UnbFeelings/UnbFeelings_api | 73c725113bc89ae4754a68f958eeaae6da85876e | [
"MIT"
] | 42 | 2018-04-03T17:30:52.000Z | 2021-06-10T19:44:04.000Z | unbfeelings/config/files.py | UnbFeelings/UnbFeelings_api | 73c725113bc89ae4754a68f958eeaae6da85876e | [
"MIT"
] | 2 | 2018-04-08T00:57:50.000Z | 2018-08-01T19:48:58.000Z | """
Configuration file for static and dynamic files.
https://docs.djangoproject.com/en/2.0/howto/static-files/
"""
import os
BASE_DIR = os.path.dirname(
os.path.dirname(
os.path.abspath(__file__)
)
)
STATIC_ROOT = os.path.join(BASE_DIR, 'staticfiles/')
STATIC_URL = '/static/'
MEDIA_ROOT = os.path.j... | 18.55 | 57 | 0.692722 | """
Configuration file for static and dynamic files.
https://docs.djangoproject.com/en/2.0/howto/static-files/
"""
import os
BASE_DIR = os.path.dirname(
os.path.dirname(
os.path.abspath(__file__)
)
)
STATIC_ROOT = os.path.join(BASE_DIR, 'staticfiles/')
STATIC_URL = '/static/'
MEDIA_ROOT = os.path.j... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
b7efb7456909feb1dc8e8042419cebae98bb241c | 102,264 | py | Python | scripts/ck2cti.py | wittregr/openmkm | 58efabaffb4235641c079b86fe05afe356b3620d | [
"MIT"
] | 3 | 2019-11-09T14:57:29.000Z | 2020-10-26T07:37:15.000Z | scripts/ck2cti.py | wittregr/openmkm | 58efabaffb4235641c079b86fe05afe356b3620d | [
"MIT"
] | 39 | 2019-12-09T13:55:34.000Z | 2021-11-03T00:59:53.000Z | scripts/ck2cti.py | wittregr/openmkm | 58efabaffb4235641c079b86fe05afe356b3620d | [
"MIT"
] | 8 | 2019-12-08T18:52:45.000Z | 2021-05-27T17:49:13.000Z | #!/usr/bin/env python
# encoding: utf-8
################################################################################
#
# Copyright (c) 2009-2011 by the RMG Team (rmg_dev@mit.edu)
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation f... | 42.257851 | 184 | 0.498934 | #!/usr/bin/env python
# encoding: utf-8
################################################################################
#
# Copyright (c) 2009-2011 by the RMG Team (rmg_dev@mit.edu)
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation f... | 0 | 4,876 | 0 | 89,949 | 0 | 3,205 | 0 | -28 | 858 |
b769105f9a5f6c08ad96aaa9781d3118591c7cca | 1,814 | py | Python | bioexcel_align/rungatk.py | djwhiteastro/BioExcel_Align | 7a7bd984ffc6b1141fa6cc08ac64a1b4463f25a5 | [
"Apache-2.0"
] | null | null | null | bioexcel_align/rungatk.py | djwhiteastro/BioExcel_Align | 7a7bd984ffc6b1141fa6cc08ac64a1b4463f25a5 | [
"Apache-2.0"
] | null | null | null | bioexcel_align/rungatk.py | djwhiteastro/BioExcel_Align | 7a7bd984ffc6b1141fa6cc08ac64a1b4463f25a5 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
"""
This script runs GATK BaseRecalibrator and/or ApplyBQSR. The script opens a
GATK process with the correct parameters.
"""
import subprocess as sp
import bioexcel_align.alignutils as au
def baserecal(jopts, threads, ref, infile, knownsites, gatkdir, sample):
'''
Create and run comman... | 27.484848 | 83 | 0.6086 | #!/usr/bin/env python
"""
This script runs GATK BaseRecalibrator and/or ApplyBQSR. The script opens a
GATK process with the correct parameters.
"""
import subprocess as sp
import bioexcel_align.alignutils as au
def baserecal(jopts, threads, ref, infile, knownsites, gatkdir, sample):
'''
Create and run comman... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
7dbdf29136875af2c08ebe386210ffce4d1ff42b | 4,560 | py | Python | Pyrado/pyrado/environments/quanser/quanser_ball_balancer.py | KhanhThiVo/SimuRLacra | fdeaf2059c2ed80ea696f018c29290510b5c4cb9 | [
"DOC",
"Zlib",
"BSD-3-Clause"
] | null | null | null | Pyrado/pyrado/environments/quanser/quanser_ball_balancer.py | KhanhThiVo/SimuRLacra | fdeaf2059c2ed80ea696f018c29290510b5c4cb9 | [
"DOC",
"Zlib",
"BSD-3-Clause"
] | null | null | null | Pyrado/pyrado/environments/quanser/quanser_ball_balancer.py | KhanhThiVo/SimuRLacra | fdeaf2059c2ed80ea696f018c29290510b5c4cb9 | [
"DOC",
"Zlib",
"BSD-3-Clause"
] | 1 | 2020-11-24T15:25:26.000Z | 2020-11-24T15:25:26.000Z | # Copyright (c) 2020, Fabio Muratore, Honda Research Institute Europe GmbH, and
# Technical University of Darmstadt.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# 1. Redistributions of source ... | 44.271845 | 111 | 0.686184 | # Copyright (c) 2020, Fabio Muratore, Honda Research Institute Europe GmbH, and
# Technical University of Darmstadt.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# 1. Redistributions of source ... | 0 | 0 | 0 | 2,399 | 0 | 0 | 0 | 182 | 223 |
a4c71be2050c9b3ed00718cd90f880978b367928 | 25,923 | py | Python | scripts/debruijn_graph.py | seryrzu/centroFlye | b2a4378bc254cc59bf13ae4e802dab478666e079 | [
"BSD-3-Clause"
] | 21 | 2019-09-17T00:53:52.000Z | 2022-03-02T09:27:48.000Z | scripts/debruijn_graph.py | seryrzu/centroFlye | b2a4378bc254cc59bf13ae4e802dab478666e079 | [
"BSD-3-Clause"
] | 14 | 2019-10-10T11:08:42.000Z | 2021-06-28T01:56:31.000Z | scripts/debruijn_graph.py | seryrzu/centroFlye | b2a4378bc254cc59bf13ae4e802dab478666e079 | [
"BSD-3-Clause"
] | 6 | 2019-11-07T14:41:43.000Z | 2021-07-22T23:37:39.000Z | # (c) 2019 by Authors
# This file is a part of centroFlye program.
# Released under the BSD license (see LICENSE file)
| 39.881538 | 98 | 0.56664 | # (c) 2019 by Authors
# This file is a part of centroFlye program.
# Released under the BSD license (see LICENSE file)
from collections import defaultdict, Counter
from itertools import groupby
import os
import subprocess
import statistics
import networkx as nx
import numpy as np
from utils.bio import read_bio_seq, ... | 0 | 0 | 0 | 10,162 | 0 | 15,077 | 0 | 76 | 477 |
8574ac17f46876dac93bc758d672218f66c25a66 | 6,084 | py | Python | homeassistant/components/shelly/climate.py | EuleMitKeule/core | 3af54d96c7dcc3f7087d1196e6ab0db029301ee7 | [
"Apache-2.0"
] | 2 | 2020-03-22T18:20:15.000Z | 2020-04-22T22:01:48.000Z | homeassistant/components/shelly/climate.py | EuleMitKeule/core | 3af54d96c7dcc3f7087d1196e6ab0db029301ee7 | [
"Apache-2.0"
] | 61 | 2020-12-18T07:13:13.000Z | 2022-03-27T18:11:09.000Z | homeassistant/components/shelly/climate.py | EuleMitKeule/core | 3af54d96c7dcc3f7087d1196e6ab0db029301ee7 | [
"Apache-2.0"
] | 2 | 2020-06-06T21:55:32.000Z | 2022-03-06T04:18:21.000Z | """Climate support for Shelly."""
from __future__ import annotations
import logging
from typing import Final
_LOGGER: Final = logging.getLogger(__name__)
| 33.245902 | 87 | 0.667817 | """Climate support for Shelly."""
from __future__ import annotations
import asyncio
import logging
from typing import Any, Final, cast
from aioshelly.block_device import Block
import async_timeout
from homeassistant.components.climate import ClimateEntity
from homeassistant.components.climate.const import (
CURR... | 0 | 1,041 | 2,175 | 1,644 | 0 | 0 | 0 | 709 | 358 |
3133962c00a25035274d3c7589e8a552e79af460 | 9,143 | py | Python | Scripts/simulation/carry/carry_sim_posture.py | velocist/TS4CheatsInfo | b59ea7e5f4bd01d3b3bd7603843d525a9c179867 | [
"Apache-2.0"
] | null | null | null | Scripts/simulation/carry/carry_sim_posture.py | velocist/TS4CheatsInfo | b59ea7e5f4bd01d3b3bd7603843d525a9c179867 | [
"Apache-2.0"
] | null | null | null | Scripts/simulation/carry/carry_sim_posture.py | velocist/TS4CheatsInfo | b59ea7e5f4bd01d3b3bd7603843d525a9c179867 | [
"Apache-2.0"
] | null | null | null | # uncompyle6 version 3.7.4
# Python bytecode 3.7 (3394)
# Decompiled from: Python 3.7.9 (tags/v3.7.9:13c94747c7, Aug 17 2020, 18:58:18) [MSC v.1900 64 bit (AMD64)]
# Embedded file name: T:\InGame\Gameplay\Scripts\Server\carry\carry_sim_posture.py
# Compiled at: 2017-10-09 20:09:11
# Size of source mod 2**32: 12375 byte... | 60.953333 | 373 | 0.749207 | # uncompyle6 version 3.7.4
# Python bytecode 3.7 (3394)
# Decompiled from: Python 3.7.9 (tags/v3.7.9:13c94747c7, Aug 17 2020, 18:58:18) [MSC v.1900 64 bit (AMD64)]
# Embedded file name: T:\InGame\Gameplay\Scripts\Server\carry\carry_sim_posture.py
# Compiled at: 2017-10-09 20:09:11
# Size of source mod 2**32: 12375 byte... | 0 | 124 | 0 | 7,645 | 0 | 0 | 0 | 601 | 375 |
8c47ca86b2f51e8487cff8272e472d55aeab9bb0 | 420 | py | Python | flexible_reports/templatetags/flexible_reports_tags.py | mpasternak/django-flexible-reports | cdf62590efb2937b30e19952a67afbc3a3e1c192 | [
"MIT"
] | 2 | 2017-08-31T11:55:26.000Z | 2018-07-14T19:39:05.000Z | flexible_reports/templatetags/flexible_reports_tags.py | mpasternak/django-flexible-reports | cdf62590efb2937b30e19952a67afbc3a3e1c192 | [
"MIT"
] | 1 | 2017-08-24T07:04:46.000Z | 2017-09-23T14:39:06.000Z | flexible_reports/templatetags/flexible_reports_tags.py | mpasternak/django-flexible-reports | cdf62590efb2937b30e19952a67afbc3a3e1c192 | [
"MIT"
] | null | null | null | # -*- encoding: utf-8 -*-
from django import template
register = template.Library()
| 23.333333 | 65 | 0.780952 | # -*- encoding: utf-8 -*-
from django import template
from django.template.base import Template
from ..adapters import django_tables2
register = template.Library()
@register.simple_tag(takes_context=True)
def flexible(context, report):
return django_tables2.as_html(report, parent_context=context)
@register.si... | 0 | 206 | 0 | 0 | 0 | 0 | 0 | 36 | 91 |
80c4cf58ac57fe835b1403d834a29cefed0319fd | 10,157 | py | Python | test/test_humbledb/test_array.py | laiyonghao/humbledb | 085991d99bd9f6ce48e33a76b52e7b08bb1da2a4 | [
"Apache-2.0"
] | 26 | 2015-01-11T01:12:15.000Z | 2022-03-26T04:09:05.000Z | test/test_humbledb/test_array.py | laiyonghao/humbledb | 085991d99bd9f6ce48e33a76b52e7b08bb1da2a4 | [
"Apache-2.0"
] | 7 | 2015-03-16T12:49:33.000Z | 2018-03-07T00:45:30.000Z | test/test_humbledb/test_array.py | laiyonghao/humbledb | 085991d99bd9f6ce48e33a76b52e7b08bb1da2a4 | [
"Apache-2.0"
] | 6 | 2015-06-05T01:55:36.000Z | 2021-06-04T16:37:39.000Z | import random
def _word():
""" Return a random "word". """
return str(random.randint(1, 15000))
| 25.203474 | 77 | 0.5605 | import random
from six.moves import xrange
from humbledb import Document
from humbledb.array import Array
from test.util import (database_name, DBTest, ok_, eq_, enable_sharding,
SkipTest, raises)
class TestArray(Array):
config_database = database_name()
config_collection = 'arrays'
config_max_s... | 0 | 974 | 0 | 164 | 0 | 7,855 | 0 | 103 | 918 |
d12730e600dffe3a6e1ae15818ba334f43efdb0b | 344 | py | Python | tests/cases/demorgan.py | MiguelMarcelino/py2many | 9b040b2a157e265df9c053eaf3e5cd644d3e30d0 | [
"MIT"
] | 2 | 2022-02-02T11:37:53.000Z | 2022-03-30T18:19:06.000Z | tests/cases/demorgan.py | MiguelMarcelino/py2many | 9b040b2a157e265df9c053eaf3e5cd644d3e30d0 | [
"MIT"
] | 25 | 2022-02-28T21:19:11.000Z | 2022-03-23T21:26:20.000Z | tests/cases/demorgan.py | MiguelMarcelino/py2many | 9b040b2a157e265df9c053eaf3e5cd644d3e30d0 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
assert demorgan(True, True)
assert demorgan(True, False)
assert demorgan(False, True)
assert demorgan(False, False)
# assert not demorgan # Should fail if uncommented
# check_sat()
print("OK")
| 22.933333 | 50 | 0.703488 | #!/usr/bin/env python3
from py2many.smt import check_sat
def demorgan(a: bool, b: bool) -> bool:
return (a and b) == (not ((not a) or (not b)))
assert demorgan(True, True)
assert demorgan(True, False)
assert demorgan(False, True)
assert demorgan(False, False)
# assert not demorgan # Should fail if uncommented
# ... | 0 | 0 | 0 | 0 | 0 | 69 | 0 | 12 | 46 |
846099d36d2c5dab784d4186a7667ada50625b67 | 5,864 | py | Python | research/deep_contextual_bandits/bandits/algorithms/neuralUCB.py | pierreosselin/models | 973d8b7a70ad4d850e7726b88bb674bbd465062f | [
"Apache-2.0"
] | null | null | null | research/deep_contextual_bandits/bandits/algorithms/neuralUCB.py | pierreosselin/models | 973d8b7a70ad4d850e7726b88bb674bbd465062f | [
"Apache-2.0"
] | null | null | null | research/deep_contextual_bandits/bandits/algorithms/neuralUCB.py | pierreosselin/models | 973d8b7a70ad4d850e7726b88bb674bbd465062f | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 The TensorFlow Authors All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicab... | 47.674797 | 372 | 0.69236 | # Copyright 2018 The TensorFlow Authors All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicab... | 2 | 0 | 0 | 4,405 | 0 | 0 | 0 | 354 | 224 |
bcb15239d4a6eed054b6a3ab98edf8d3fed58227 | 4,199 | py | Python | ToPCLI/Todoist.py | NAndLib/todoist-plugable-cli | 006f9d6f1ccda99c28cf3e1a7da18d93479cb44a | [
"MIT"
] | 6 | 2019-10-21T00:18:59.000Z | 2020-01-08T05:11:43.000Z | ToPCLI/Todoist.py | NAndLib/todoist-plugable-cli | 006f9d6f1ccda99c28cf3e1a7da18d93479cb44a | [
"MIT"
] | null | null | null | ToPCLI/Todoist.py | NAndLib/todoist-plugable-cli | 006f9d6f1ccda99c28cf3e1a7da18d93479cb44a | [
"MIT"
] | 2 | 2019-09-22T02:18:11.000Z | 2019-11-26T21:11:46.000Z |
CODE_TO_COLORS = {
30 : 'BERRY_RED',
31 : 'RED',
32 : 'ORANGE',
33 : 'YELLOW',
34 : 'OLIVE_GREEN',
35 : 'LIME_GREEN',
36 : 'GREEN',
37 : 'MINT_GREEN',
38 : 'TEAL',
39 : 'SKY_BLUE',
40 : 'LIGHT_BLUE',
41 : 'BLUE',
42 : 'GRAPE',
43 : 'VIOLET',
44 : 'LAVENDER',
... | 24.846154 | 78 | 0.542034 | from config import token, cache_dir
from contextlib import contextmanager
import sys
import todoist
CODE_TO_COLORS = {
30 : 'BERRY_RED',
31 : 'RED',
32 : 'ORANGE',
33 : 'YELLOW',
34 : 'OLIVE_GREEN',
35 : 'LIME_GREEN',
36 : 'GREEN',
37 : 'MINT_GREEN',
38 : 'TEAL',
39 : 'SKY_BLUE'... | 0 | 1,701 | 0 | 1,381 | 0 | 0 | 0 | 12 | 111 |
54dcfc2501c7b0a5d2379bb8ce65f8bc2a512d50 | 7,326 | py | Python | CalibTracker/SiStripDCS/test/FilterTrackerOn_cfg.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 852 | 2015-01-11T21:03:51.000Z | 2022-03-25T21:14:00.000Z | CalibTracker/SiStripDCS/test/FilterTrackerOn_cfg.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 30,371 | 2015-01-02T00:14:40.000Z | 2022-03-31T23:26:05.000Z | CalibTracker/SiStripDCS/test/FilterTrackerOn_cfg.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 3,240 | 2015-01-02T05:53:18.000Z | 2022-03-31T17:24:21.000Z | import FWCore.ParameterSet.Config as cms
process = cms.Process("SynchronizeDCSO2O")
process.load("FWCore.MessageService.MessageLogger_cfi")
process.maxEvents = cms.untracked.PSet(
input = cms.untracked.int32(100)
)
process.poolDBESSource = cms.ESSource("PoolDBESSource",
BlobStreamerName = cms.untracked.strin... | 68.46729 | 139 | 0.78433 | import FWCore.ParameterSet.Config as cms
process = cms.Process("SynchronizeDCSO2O")
process.load("FWCore.MessageService.MessageLogger_cfi")
process.maxEvents = cms.untracked.PSet(
input = cms.untracked.int32(100)
)
process.poolDBESSource = cms.ESSource("PoolDBESSource",
BlobStreamerName = cms.untracked.strin... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
df518506ab8552c979397708cba84b2cb4e1c55d | 4,854 | py | Python | database/crawler/crawl_plantlist.py | tttor/csipb-jamu-prj | 33b08a8a12054c8a5a7240681a28c8b233b329ba | [
"MIT"
] | 5 | 2017-03-31T03:25:09.000Z | 2021-12-17T02:28:24.000Z | database/crawler/crawl_plantlist.py | tttor/csipb-jamu-prj | 33b08a8a12054c8a5a7240681a28c8b233b329ba | [
"MIT"
] | 165 | 2016-08-11T01:59:47.000Z | 2017-10-10T06:32:12.000Z | database/crawler/crawl_plantlist.py | tttor/csipb-jamu-prj | 33b08a8a12054c8a5a7240681a28c8b233b329ba | [
"MIT"
] | 11 | 2015-06-15T04:25:59.000Z | 2021-04-18T09:39:16.000Z | # crawl_plantlist.py
import time
if __name__ == '__main__':
start_time = time.time()
main()
print("--- %s seconds ---" % (time.time() - start_time))
| 31.519481 | 121 | 0.519778 | # crawl_plantlist.py
import glob
import time
import json
import datetime
import yaml
from urllib2 import urlopen
from bs4 import BeautifulSoup
def main():
# dirpath = '/home/tor/robotics/prj/csipb-jamu-prj/dataset/plant-list'
# parseMiscPlantList(dirpath)
latin2idr = None
with open('/home/tor/robotics... | 0 | 0 | 0 | 0 | 0 | 4,513 | 0 | -22 | 201 |
41799e74f2525484085dec098d110842a9dd3c57 | 6,709 | py | Python | john_doe/names/lithuania.py | xioren/JohnDoe | 4bd16f394709cac246438c8ffd650b4b301cb2b7 | [
"MIT"
] | null | null | null | john_doe/names/lithuania.py | xioren/JohnDoe | 4bd16f394709cac246438c8ffd650b4b301cb2b7 | [
"MIT"
] | null | null | null | john_doe/names/lithuania.py | xioren/JohnDoe | 4bd16f394709cac246438c8ffd650b4b301cb2b7 | [
"MIT"
] | null | null | null | male = [
'ADOMAS',
'ALBERTAS',
'ALEKSANDRAS',
'ALFREDAS',
'ANDRIUS',
'ANTANAS',
'ARAS',
'ARNOLDAS',
'ARONAS',
'ARTRAS',
'AUGUSTAS',
'AUGUSTINAS',
'AURELIJUS',
'UOLAS',
'BENAS',
'BENEDIKTAS',
'BENJAMINAS',
'BRONISLOVAS',
'BRONIUS',
'DANIELIU... | 16.166265 | 24 | 0.512893 | male = [
'ADOMAS',
'ALBERTAS',
'ALEKSANDRAS',
'ALFREDAS',
'ANDRIUS',
'ANTANAS',
'ARAS',
'ARNOLDAS',
'ARONAS',
'ARTŪRAS',
'AUGUSTAS',
'AUGUSTINAS',
'AURELIJUS',
'ĄŽUOLAS',
'BENAS',
'BENEDIKTAS',
'BENJAMINAS',
'BRONISLOVAS',
'BRONIUS',
'DANIE... | 522 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
fc821d98b610296c4af0290c0de3d150b92e4d33 | 1,103 | py | Python | src/der_py/clients/wiki.py | rarescosma/der-py | ac67039d530e090977683d688733591bf5f2912e | [
"MIT"
] | null | null | null | src/der_py/clients/wiki.py | rarescosma/der-py | ac67039d530e090977683d688733591bf5f2912e | [
"MIT"
] | null | null | null | src/der_py/clients/wiki.py | rarescosma/der-py | ac67039d530e090977683d688733591bf5f2912e | [
"MIT"
] | null | null | null | """Client for the Wikipedia REST API."""
import click
import requests
from marshmallow import ValidationError
API_URL: str = (
"https://{language}.wikipedia.org/api/rest_v1/page/random/summary"
)
def random_page(language: str = "en") -> Page:
"""Fetch a random page from the Wikipedia API.
Example:
... | 25.068182 | 73 | 0.679057 | """Client for the Wikipedia REST API."""
from dataclasses import dataclass
from functools import lru_cache
from typing import Type
import click
import requests
from desert import schema
from marshmallow import EXCLUDE, Schema, ValidationError
API_URL: str = (
"https://{language}.wikipedia.org/api/rest_v1/page/ran... | 0 | 162 | 0 | 0 | 0 | 0 | 0 | 45 | 134 |
41d7c419c5b8bb109b110c4abc4f774582dc34b3 | 2,358 | py | Python | cornac/models/wmf/wmf.py | carmanzhang/cornac | 215efd0ffa7b8ee1afe1ac6b5cc650ee6303ace3 | [
"Apache-2.0"
] | 597 | 2018-07-17T10:59:56.000Z | 2022-03-31T07:59:36.000Z | cornac/models/wmf/wmf.py | carmanzhang/cornac | 215efd0ffa7b8ee1afe1ac6b5cc650ee6303ace3 | [
"Apache-2.0"
] | 137 | 2018-10-12T10:52:11.000Z | 2022-03-04T15:26:49.000Z | cornac/models/wmf/wmf.py | carmanzhang/cornac | 215efd0ffa7b8ee1afe1ac6b5cc650ee6303ace3 | [
"Apache-2.0"
] | 112 | 2018-07-26T04:36:34.000Z | 2022-03-31T02:29:34.000Z | # Copyright 2018 The Cornac Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable ... | 42.107143 | 104 | 0.652248 | # Copyright 2018 The Cornac Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable ... | 0 | 0 | 0 | 1,626 | 0 | 0 | 0 | 2 | 46 |
6d19137bdd0ff814c101d2bf78521b04db326e71 | 1,736 | py | Python | technical_testing/tun_server.py | calllivecn/VirtualLAN | a6d90bf95a8c8a9a923e78d54238921fa2e9e5aa | [
"Apache-2.0"
] | 1 | 2020-11-09T05:37:51.000Z | 2020-11-09T05:37:51.000Z | technical_testing/tun_server.py | calllivecn/VirtualLAN | a6d90bf95a8c8a9a923e78d54238921fa2e9e5aa | [
"Apache-2.0"
] | null | null | null | technical_testing/tun_server.py | calllivecn/VirtualLAN | a6d90bf95a8c8a9a923e78d54238921fa2e9e5aa | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
#coding=utf-8
import socket, threading
sock_dict={}
sock_dict_lock=threading.Lock()
Buffer=2048
accept_access()
for k,v in zip(sock_dict.keys(),sock_dict.values()):
print(k,v)
th1=threading.Thread(target=router,args=(socket.inet_aton('172.16.10.100'),socket.inet_aton('172.16.10.101')),daemo... | 25.15942 | 119 | 0.711982 | #!/usr/bin/env python3
#coding=utf-8
import fcntl,subprocess,socket,struct,multiprocessing,queue,threading
sock_dict={}
sock_dict_lock=threading.Lock()
Buffer=2048
def accept_access():
global sock_dict
sock = socket.socket()
sock.setsockopt(socket.SOL_SOCKET,socket.SO_REUSEADDR,1)
sock.bind(('0.0.0.0',6789))
so... | 6 | 0 | 0 | 0 | 0 | 1,040 | 0 | 45 | 46 |
d5d3272d07a57926a2ffea8ed52878ae08a674d6 | 39 | py | Python | pyemma/datasets/__init__.py | trendelkampschroer/PyEMMA | ee5784d5c1c5bc070fe2e9e6ad4f24b36185dc20 | [
"BSD-2-Clause"
] | 1 | 2020-01-21T16:55:38.000Z | 2020-01-21T16:55:38.000Z | pyemma/datasets/__init__.py | trendelkampschroer/PyEMMA | ee5784d5c1c5bc070fe2e9e6ad4f24b36185dc20 | [
"BSD-2-Clause"
] | 1 | 2022-01-10T18:09:25.000Z | 2022-01-10T18:09:25.000Z | pyemma/datasets/__init__.py | clonker/PyEMMA | a36534ce2ec6a799428dfbdef0465c979e6c68aa | [
"BSD-2-Clause"
] | null | null | null | __author__ = 'noe'
| 9.75 | 18 | 0.666667 | __author__ = 'noe'
from .api import *
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | -3 | 23 |
dea7b5b4a1f57a26402e9a05dce5e51d5a8971c4 | 1,172 | py | Python | migrations/versions/82184d7d1e88_altered-OAuth2Token-token_type-to-Enum.py | IsmaelJS/test-github-actions | 97223df261e9736c46875f590c9593dbac0d417b | [
"MIT"
] | 1,420 | 2015-11-20T01:25:14.000Z | 2022-03-22T03:51:33.000Z | migrations/versions/82184d7d1e88_altered-OAuth2Token-token_type-to-Enum.py | IsmaelJS/test-github-actions | 97223df261e9736c46875f590c9593dbac0d417b | [
"MIT"
] | 151 | 2016-01-07T09:11:42.000Z | 2020-11-17T08:37:07.000Z | migrations/versions/82184d7d1e88_altered-OAuth2Token-token_type-to-Enum.py | IsmaelJS/test-github-actions | 97223df261e9736c46875f590c9593dbac0d417b | [
"MIT"
] | 389 | 2015-11-23T01:14:31.000Z | 2022-02-07T08:23:11.000Z | """Alter OAuth2Token.token_type to Enum
Revision ID: 82184d7d1e88
Revises: 5e2954a2af18
Create Date: 2016-11-10 21:14:33.787194
"""
# revision identifiers, used by Alembic.
revision = '82184d7d1e88'
down_revision = '5e2954a2af18'
| 27.255814 | 77 | 0.674915 | """Alter OAuth2Token.token_type to Enum
Revision ID: 82184d7d1e88
Revises: 5e2954a2af18
Create Date: 2016-11-10 21:14:33.787194
"""
# revision identifiers, used by Alembic.
revision = '82184d7d1e88'
down_revision = '5e2954a2af18'
from alembic import op
import sqlalchemy as sa
def upgrade():
connection = op.ge... | 0 | 0 | 0 | 0 | 0 | 843 | 0 | 3 | 91 |
9a293daabc9144ea9f43e8e0d87e3ba663015e9f | 1,232 | py | Python | src/main/sarscovhierarchy.py | JasterV/SARSCOV-HIERARCHY | 46d94443c69a6f874329e18bf2718dc0ee629a89 | [
"Unlicense"
] | 4 | 2020-05-26T08:38:58.000Z | 2020-11-01T02:13:14.000Z | src/main/sarscovhierarchy.py | manudiv16/SARSCOV-HIERARCHY | b10657f78c7d54a91d58431339e58f8324783ed1 | [
"Unlicense"
] | null | null | null | src/main/sarscovhierarchy.py | manudiv16/SARSCOV-HIERARCHY | b10657f78c7d54a91d58431339e58f8324783ed1 | [
"Unlicense"
] | 1 | 2020-05-25T21:00:32.000Z | 2020-05-25T21:00:32.000Z | import os
import signal
from sys import argv
signal.signal(signal.SIGTSTP, signal.SIG_IGN)
if __name__ == '__main__':
if len(argv) == 2:
pid_h = os.fork()
if pid_h == 0:
main()
else:
try:
os.wait()
except KeyboardInterrupt:
... | 28.651163 | 72 | 0.659903 | import os
import signal
from os.path import join
from sys import argv
from utils.csv_table import CsvTable
from utils.fasta_map import FastaMap
from utils.hierarchy_tree import HierarchyTree
signal.signal(signal.SIGTSTP, signal.SIG_IGN)
def main():
data_dir = argv[1]
csv_path = join(data_dir, "sequences.cs... | 0 | 0 | 0 | 0 | 0 | 604 | 0 | 58 | 112 |
7f8324a4e70c461d823a06bf024e94c7e1abe7ba | 1,829 | py | Python | tests/test_stack.py | stoyan3d/python-algorithms | 1d18647c821d4dac04b7d7c98443a3218f6348a6 | [
"MIT"
] | null | null | null | tests/test_stack.py | stoyan3d/python-algorithms | 1d18647c821d4dac04b7d7c98443a3218f6348a6 | [
"MIT"
] | null | null | null | tests/test_stack.py | stoyan3d/python-algorithms | 1d18647c821d4dac04b7d7c98443a3218f6348a6 | [
"MIT"
] | null | null | null | import unittest
if __name__ == '__main__':
unittest.main() | 24.386667 | 58 | 0.592674 | from datastructures.stack import Stack
import unittest
class TestStack(unittest.TestCase):
def test_is_empty_on_stack_with_items(self):
stack = Stack()
stack.push(2)
self.assertFalse(stack.is_empty)
def test_is_empty_on_empty_stack(self):
stack = Stack()
self.assertTr... | 0 | 0 | 0 | 1,702 | 0 | 0 | 0 | 17 | 45 |
80e594274b796137765cdaa1ff34b7b4195fd631 | 347 | py | Python | Prosjekt 4 - Raspberry pi/waveshare/fiks_image.py | stellanova88/DigiFab | 1a5e7abbc8a9535c67e3d826408508b7e53584c0 | [
"MIT"
] | null | null | null | Prosjekt 4 - Raspberry pi/waveshare/fiks_image.py | stellanova88/DigiFab | 1a5e7abbc8a9535c67e3d826408508b7e53584c0 | [
"MIT"
] | null | null | null | Prosjekt 4 - Raspberry pi/waveshare/fiks_image.py | stellanova88/DigiFab | 1a5e7abbc8a9535c67e3d826408508b7e53584c0 | [
"MIT"
] | null | null | null | from PIL import Image
import requests
url = "https://www.yr.no/place/Norway/Viken/Halden/Halden//meteogram.png"
response = requests.get(url, stream = True)
img = Image.open(response.raw)
#TODO! Test image size 800, x
img.thumbnail((800, 262)) #Resizing
#TODO! Convert better
img = img.convert("L")
#img.show()
img... | 15.086957 | 73 | 0.708934 | from PIL import Image
import requests
url = "https://www.yr.no/place/Norway/Viken/Halden/Halden//meteogram.png"
response = requests.get(url, stream = True)
img = Image.open(response.raw)
#TODO! Test image size 800, x
img.thumbnail((800, 262)) #Resizing
#TODO! Convert better
img = img.convert("L")
#img.show()
img... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
67e9775c49230406c399f8ec6bbaf10b3a57dddc | 202,905 | py | Python | sources/duployan.py | dscorbett/duployan-font | 966e4e233f56d818bbbcb4548f1cf232cd3fe4a1 | [
"Apache-2.0"
] | 6 | 2020-04-06T02:14:07.000Z | 2022-03-22T09:13:47.000Z | sources/duployan.py | dscorbett/duployan-font | 966e4e233f56d818bbbcb4548f1cf232cd3fe4a1 | [
"Apache-2.0"
] | 2 | 2021-07-19T10:20:41.000Z | 2021-12-16T01:25:02.000Z | sources/duployan.py | dscorbett/duployan-font | 966e4e233f56d818bbbcb4548f1cf232cd3fe4a1 | [
"Apache-2.0"
] | 1 | 2019-08-04T03:40:57.000Z | 2019-08-04T03:40:57.000Z | # Copyright 2018-2019 David Corbett
# Copyright 2019-2021 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by ... | 52.013586 | 1,416 | 0.580779 | # Copyright 2018-2019 David Corbett
# Copyright 2019-2021 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by ... | 12 | 685 | 0 | 191,833 | 0 | 6,680 | 0 | 370 | 1,773 |