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
9cfa3eeaeb88cbcd76182b31b503d13fe3319968
6,615
py
Python
scratch/jpg.py
chk141/stegosploit-python
687edb9c9bfc5c0f2b4b9f2d8ff2e37c53833198
[ "WTFPL" ]
9
2019-02-21T07:27:01.000Z
2021-11-09T00:18:17.000Z
scratch/jpg.py
amichael7/python-stegosploit
078934213e48d41f176b7e1e61422e4ad0bdbf5b
[ "WTFPL" ]
null
null
null
scratch/jpg.py
amichael7/python-stegosploit
078934213e48d41f176b7e1e61422e4ad0bdbf5b
[ "WTFPL" ]
2
2020-05-04T13:00:54.000Z
2021-06-19T05:56:29.000Z
''' jpg.py <alexmichael@uchicago.edu> Description: Prototype of polyglot generator. TODO: - [ ] Build the least significant bit layer injector ''' if __name__ == '__main__': main() # read() # test()
29.013158
1,140
0.647468
''' jpg.py <alexmichael@uchicago.edu> Description: Prototype of polyglot generator. TODO: - [ ] Build the least significant bit layer injector ''' import struct import re import random class Polyglot: def __init__(self): self.infile = open('stego.jpg','rb') self.outfile = open('out3.html','wb') def genRan...
0
0
0
6,099
0
174
0
-28
159
3ba17cb32481b123c951bdcfe07822edf9a689ba
6,614
py
Python
pyny/node.py
namuyan/pyny
c48f0aa9f61ab0628e08236c27ff4cde92d34f3b
[ "BSD-2-Clause" ]
1
2020-02-29T03:41:17.000Z
2020-02-29T03:41:17.000Z
pyny/node.py
namuyan/pyny
c48f0aa9f61ab0628e08236c27ff4cde92d34f3b
[ "BSD-2-Clause" ]
null
null
null
pyny/node.py
namuyan/pyny
c48f0aa9f61ab0628e08236c27ff4cde92d34f3b
[ "BSD-2-Clause" ]
null
null
null
'''Winny Node. ''' # # Copyright (c) 2006 Pyny Project. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # 1. Redistributions of source code must retain the above copyright # notice, this list...
28.508621
88
0.592985
'''Winny Node. ''' # # Copyright (c) 2006 Pyny Project. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # 1. Redistributions of source code must retain the above copyright # notice, this list...
0
0
0
3,106
0
69
0
6
112
ad8435b5d4017d9f560a513aa159bd374be32be4
1,012
py
Python
auto_ping.py
XC-Li/Raspberry_Projects
48b61832641fea1dcbd24b651266fe767d8cd254
[ "MIT" ]
null
null
null
auto_ping.py
XC-Li/Raspberry_Projects
48b61832641fea1dcbd24b651266fe767d8cd254
[ "MIT" ]
null
null
null
auto_ping.py
XC-Li/Raspberry_Projects
48b61832641fea1dcbd24b651266fe767d8cd254
[ "MIT" ]
null
null
null
# This is the program to run ping test on local network # XC.Li @ Apr.10 2018 # read in ping_list and ping_config ping_list, ping_config = start_up("ping_list.txt", "ping_config.txt") print(ping_list) print(ping_config)
29.764706
70
0.652174
# This is the program to run ping test on local network # XC.Li @ Apr.10 2018 # read in ping_list and ping_config def start_up(ping_list_fn, ping_config_fn): ping_list_file_name = ping_list_fn ping_list_file = open(ping_list_file_name,"r") ping_list = {} for line in ping_list_file: l...
0
0
0
0
0
753
0
0
23
e81bd792870a0dfb3237f277456bdd8f9d39dbc4
140
py
Python
schools3/config/ml/experiments/cross_tabs_experiment_config.py
dssg/mlpolicylab_fall20_schools3_public
f8eff4c56e9bada1eb81ddaca03686d7ef53c2c4
[ "MIT" ]
null
null
null
schools3/config/ml/experiments/cross_tabs_experiment_config.py
dssg/mlpolicylab_fall20_schools3_public
f8eff4c56e9bada1eb81ddaca03686d7ef53c2c4
[ "MIT" ]
null
null
null
schools3/config/ml/experiments/cross_tabs_experiment_config.py
dssg/mlpolicylab_fall20_schools3_public
f8eff4c56e9bada1eb81ddaca03686d7ef53c2c4
[ "MIT" ]
null
null
null
import sys from schools3.config import base_config config = base_config.Config() config.num_features = 10 sys.modules[__name__] = config
15.555556
39
0.792857
import sys from schools3.config import base_config config = base_config.Config() config.num_features = 10 sys.modules[__name__] = config
0
0
0
0
0
0
0
0
0
b66dac366c5b7d055a02ed46b14a39c6d3ca594e
4,476
py
Python
infrastructure/tools/batchdelete.py
uk-gov-mirror/NHSX.covid-chest-imaging-database
77799a97193d09e9267182d18fbb79d604bbb038
[ "MIT" ]
56
2020-04-08T12:40:28.000Z
2021-10-02T22:57:16.000Z
infrastructure/tools/batchdelete.py
uk-gov-mirror/NHSX.covid-chest-imaging-database
77799a97193d09e9267182d18fbb79d604bbb038
[ "MIT" ]
111
2020-04-02T13:23:06.000Z
2022-03-30T13:23:28.000Z
infrastructure/tools/batchdelete.py
uk-gov-mirror/NHSX.covid-chest-imaging-database
77799a97193d09e9267182d18fbb79d604bbb038
[ "MIT" ]
10
2020-05-05T14:07:11.000Z
2022-01-11T15:47:27.000Z
#!/usr/bin/env python import argparse import math import sys from concurrent.futures import ThreadPoolExecutor, as_completed import boto3 from tqdm.auto import tqdm client = boto3.client("s3") objects = [] parser = argparse.ArgumentParser(description="Delete files from S3") parser.add_argument("--bucket", help="The...
32.201439
98
0.606122
#!/usr/bin/env python import argparse import math import sys from concurrent.futures import ThreadPoolExecutor, as_completed import boto3 from tqdm.auto import tqdm client = boto3.client("s3") objects = [] parser = argparse.ArgumentParser(description="Delete files from S3") parser.add_argument("--bucket", help="The...
0
0
0
0
0
1,202
0
0
23
caa7cfa00699a920210f1adb177a1534ba707a0d
5,708
py
Python
train.py
UrbanOS-Examples/PredictiveParking
778acb68a0c8be78655d38698ab68f1c1b47cbc5
[ "Apache-2.0" ]
2
2021-03-29T03:36:32.000Z
2021-07-01T16:51:18.000Z
train.py
UrbanOS-Examples/PredictiveParking
778acb68a0c8be78655d38698ab68f1c1b47cbc5
[ "Apache-2.0" ]
null
null
null
train.py
UrbanOS-Examples/PredictiveParking
778acb68a0c8be78655d38698ab68f1c1b47cbc5
[ "Apache-2.0" ]
1
2022-01-28T15:56:00.000Z
2022-01-28T15:56:00.000Z
#!/usr/bin/env python3 import logging import sys from pathlib import Path LOGGER = logging.getLogger(__name__) LOGGER.setLevel(logging.INFO) if sys.stdout.isatty(): LOGGER.addHandler(logging.StreamHandler(sys.stdout)) DIRNAME = Path(__file__).parent.absolute() if __name__ == '__main__': main()
33.576471
104
0.692537
#!/usr/bin/env python3 import configparser import getpass import logging import os import sys from dataclasses import InitVar, dataclass from datetime import date, datetime, timedelta from pathlib import Path import pandas as pd import pyodbc from prometheus_client import CollectorRegistry, Gauge, push_to_gateway fro...
0
440
0
0
0
4,336
0
166
451
74964d9336f7d99fb8cee5047b7ac3e34e05ce4a
8,356
py
Python
tests/test_pyhpeimc_plat_system.py
HPNetworking/HP-Intelligent-Management-Center
4fba31827573587e03a6233c7db60f188038c8e5
[ "Apache-2.0" ]
13
2016-03-14T17:55:03.000Z
2021-03-26T07:18:26.000Z
tests/test_pyhpeimc_plat_system.py
HPNetworking/HP-Intelligent-Management-Center
4fba31827573587e03a6233c7db60f188038c8e5
[ "Apache-2.0" ]
7
2016-08-04T17:39:11.000Z
2017-09-19T13:42:35.000Z
tests/test_pyhpeimc_plat_system.py
HPNetworking/HP-Intelligent-Management-Center
4fba31827573587e03a6233c7db60f188038c8e5
[ "Apache-2.0" ]
17
2016-03-03T05:24:20.000Z
2022-03-10T08:16:31.000Z
# -*- coding: utf-8 -*- """ This module is used for testing the functions within the pyhpeimc.plat.system module. """ # get_system_category # get_system_device_models # get_system_series # Section deals with device authentication templates. Get and Set functions available apply to # IMC 7.3 and later
34.962343
96
0.620273
# -*- coding: utf-8 -*- """ This module is used for testing the functions within the pyhpeimc.plat.system module. """ from unittest import TestCase from pyhpeimc.plat.system import * from test_machine import auth class TestGet_system_vendors(TestCase): def test_get_system_vendors_type(self): vendors = ...
0
0
0
7,787
0
0
0
29
226
bfbcec6a8ee5fbcb969bbb111e067bf54dd04755
3,548
py
Python
local_dump.py
jhyuklee/sparc
bee309bdffd73d162c23a7c3c0b63cebe4aaea97
[ "Apache-2.0" ]
48
2020-05-01T07:10:51.000Z
2022-03-19T09:09:41.000Z
local_dump.py
jhyuklee/sparc
bee309bdffd73d162c23a7c3c0b63cebe4aaea97
[ "Apache-2.0" ]
1
2020-10-23T19:04:52.000Z
2020-11-06T03:18:46.000Z
local_dump.py
jhyuklee/sparc
bee309bdffd73d162c23a7c3c0b63cebe4aaea97
[ "Apache-2.0" ]
12
2020-05-07T08:32:07.000Z
2021-04-26T02:19:31.000Z
if __name__ == '__main__': main()
40.781609
105
0.627678
import argparse import math import os import subprocess def run_dump_phrase(args): parallel = '--parallel' if args.parallel else '' do_case = '--do_case' if args.do_case else '' use_biobert = '--use_biobert' if args.use_biobert else '' append_title = '--append_title' if args.append_title else '' ...
0
0
0
0
0
3,380
0
-32
157
16f24d171e4d038a84215a3fe535a1ab99c69de6
5,292
py
Python
app.py
Abdulaziz-Hassan/todolist-website
1ab434ab0f17a41d74da13eef3ee11fe618f5c7d
[ "MIT" ]
null
null
null
app.py
Abdulaziz-Hassan/todolist-website
1ab434ab0f17a41d74da13eef3ee11fe618f5c7d
[ "MIT" ]
null
null
null
app.py
Abdulaziz-Hassan/todolist-website
1ab434ab0f17a41d74da13eef3ee11fe618f5c7d
[ "MIT" ]
1
2021-10-06T00:22:17.000Z
2021-10-06T00:22:17.000Z
from flask import Flask from flask_bootstrap import Bootstrap from flask_ckeditor import CKEditor from flask_login import LoginManager from dotenv import load_dotenv from database import db import os app = Flask(__name__) load_dotenv() app.config["SECRET_KEY"] = os.environ.get("SECRET_KEY", "APP_SECRET_KEY") app.con...
33.493671
107
0.683862
from flask import Flask, render_template, redirect, url_for, flash from flask_bootstrap import Bootstrap from flask_ckeditor import CKEditor from flask_login import login_user, LoginManager, current_user, logout_user, login_required from werkzeug.security import generate_password_hash, check_password_hash from dotenv i...
0
3,908
0
0
0
0
0
190
295
8a46116e77bc676f3f2e0b86a6d0744c6d076126
5,695
py
Python
TikTok-Views-BOT.py
aneppew/test-2
09141d0b94cf8a13a79e9c93e801973a50d2b08e
[ "BSL-1.0" ]
null
null
null
TikTok-Views-BOT.py
aneppew/test-2
09141d0b94cf8a13a79e9c93e801973a50d2b08e
[ "BSL-1.0" ]
null
null
null
TikTok-Views-BOT.py
aneppew/test-2
09141d0b94cf8a13a79e9c93e801973a50d2b08e
[ "BSL-1.0" ]
null
null
null
#coding: utf-8 from selenium import webdriver from selenium import webdriver from selenium.webdriver.support.ui import WebDriverWait from colorama import init from colorama import Fore import os clear() logo() maxi = 0 start = '/@' end = '/video/' views = ' ' boosted_link = input('{}\n[>] {}T...
32.729885
130
0.600702
#coding: utf-8 from selenium import webdriver from webdriver_manager.chrome import ChromeDriverManager from selenium import webdriver from selenium.common.exceptions import TimeoutException from selenium.common.exceptions import NoSuchElementException from selenium.webdriver.support.ui import WebDriverWait fro...
497
0
0
0
0
4,039
0
237
311
56ad1660dbb7bac6852c27d799d0133363c566fc
5,661
py
Python
tests/module_cfg/test_env_vars.py
filfreire/questions-three
1d1d621d5647407bf2d1b271e0b9c7c9f1afc5c8
[ "MIT" ]
5
2019-07-22T06:04:07.000Z
2021-07-23T06:01:51.000Z
tests/module_cfg/test_env_vars.py
filfreire/questions-three
1d1d621d5647407bf2d1b271e0b9c7c9f1afc5c8
[ "MIT" ]
15
2020-07-28T17:33:40.000Z
2021-08-23T17:30:05.000Z
tests/module_cfg/test_env_vars.py
filfreire/questions-three
1d1d621d5647407bf2d1b271e0b9c7c9f1afc5c8
[ "MIT" ]
4
2019-08-25T22:41:59.000Z
2020-10-21T14:28:15.000Z
from unittest import main UNSET = object() if "__main__" == __name__: main()
37.74
81
0.721251
from functools import partial from unittest import TestCase, main from expects import expect, equal from questions_three.exceptions import InvalidConfiguration from twin_sister.expects_matchers import complain from twin_sister import open_dependency_context from questions_three.module_cfg.module_cfg import ModuleCfg ...
0
0
0
5,258
0
0
0
160
157
027426ac3118fd7597d0153f48ac1e25012779be
476
py
Python
Week 08/id_545/LeetCode_438_545.py
sekishi/algorithm004-05
1f1508c03edb94db96a7642e0c746233184a60d3
[ "Apache-2.0" ]
1
2019-10-12T06:48:45.000Z
2019-10-12T06:48:45.000Z
Week 08/id_545/LeetCode_438_545.py
sekishi/algorithm004-05
1f1508c03edb94db96a7642e0c746233184a60d3
[ "Apache-2.0" ]
null
null
null
Week 08/id_545/LeetCode_438_545.py
sekishi/algorithm004-05
1f1508c03edb94db96a7642e0c746233184a60d3
[ "Apache-2.0" ]
null
null
null
#
26.444444
56
0.382353
# 找到字符串中所有字母异位词 class Solution: def findAnagrams(self, s: str, p: str) -> List[int]: ns, np = len(s), len(p) t = collections.Counter(s[: np]) d = collections.Counter(p) ans = [] for i in range(ns - np): if d == t: ans += [i] t[s[i + np...
39
0
0
438
0
0
0
0
23
ac91062254bf5f8d27b2d7f0cbcccee6131ca849
13,757
py
Python
CAIL2020/sfksu/model.py
ShenDezhou/CAIL
c4cfa98ab4ecedbce34a7a5a186830486047540c
[ "Apache-2.0" ]
71
2020-07-16T01:49:27.000Z
2022-03-27T16:55:00.000Z
CAIL2020/sfkst/model.py
ShenDezhou/CAIL
c4cfa98ab4ecedbce34a7a5a186830486047540c
[ "Apache-2.0" ]
11
2020-09-18T14:26:25.000Z
2022-02-09T23:49:33.000Z
CAIL2020/sfkst/model.py
ShenDezhou/CAIL
c4cfa98ab4ecedbce34a7a5a186830486047540c
[ "Apache-2.0" ]
16
2020-07-15T07:24:30.000Z
2022-03-19T05:41:11.000Z
import torch.nn as nn # from pytorch_pretrained_bert import BertModel #20200621, bert -> dropout -> conv -> linear -> bn -> softmax: acc=14.42
42.070336
91
0.510286
import torch import torch.nn as nn import torch.nn.functional as F # from pytorch_pretrained_bert import BertModel from transformers.modeling_bert import BertModel from accuracy_tool import single_label_top1_accuracy class BertQA(nn.Module): def __init__(self, config, gpu_list, *args, **params): super(Ber...
0
0
0
13,419
0
0
0
59
134
8b745aeb462ee5735a3280ce54a587a98a3b75f0
3,150
py
Python
tasktiger/redis_semaphore.py
timgates42/tasktiger
5b54a127c538b019af3690e4e7f6c0c8a9904fe1
[ "MIT" ]
1,143
2015-10-01T19:44:10.000Z
2022-03-26T17:32:14.000Z
tasktiger/redis_semaphore.py
timgates42/tasktiger
5b54a127c538b019af3690e4e7f6c0c8a9904fe1
[ "MIT" ]
126
2016-01-20T10:19:33.000Z
2022-03-31T18:19:41.000Z
tasktiger/redis_semaphore.py
timgates42/tasktiger
5b54a127c538b019af3690e4e7f6c0c8a9904fe1
[ "MIT" ]
78
2015-10-04T06:51:59.000Z
2022-03-26T17:32:16.000Z
"""Redis Semaphore lock.""" SYSTEM_LOCK_ID = 'SYSTEM_LOCK'
28.378378
86
0.594603
"""Redis Semaphore lock.""" import os import time SYSTEM_LOCK_ID = 'SYSTEM_LOCK' class Semaphore(object): """Semaphore lock using Redis ZSET.""" def __init__(self, redis, name, lock_id, timeout, max_locks=1): """ Semaphore lock. Semaphore logic is implemented in the lua/semaphore.l...
0
1,066
0
1,977
0
0
0
-22
68
0b8b07e3007f60eff722f64ed55393ee7d81bac4
1,224
py
Python
htms_low/htms_low_api/__init__.py
Arselon/HTMS
76068fa605b9e7b77ef98428a0b987aa50f94c9d
[ "Apache-2.0" ]
null
null
null
htms_low/htms_low_api/__init__.py
Arselon/HTMS
76068fa605b9e7b77ef98428a0b987aa50f94c9d
[ "Apache-2.0" ]
null
null
null
htms_low/htms_low_api/__init__.py
Arselon/HTMS
76068fa605b9e7b77ef98428a0b987aa50f94c9d
[ "Apache-2.0" ]
null
null
null
__title__ = 'htms_low_api' __version__ = '2.3.1' __author__ = 'Arslan Aliev' __license__ = 'Apache License, Version 2.0' __copyright__ = 'Copyright (c) 2018-2021 Arslan S. Aliev' from .htms_par_low import (PAGESIZE1, NUMPAGES1, MAXSTRLEN1, PAGESIZE2, NUMPAGES2, SERVER_IP_DNS, MAIN_SERVER_PORT, HTDB_ROOT, MAX_FILE_NAM...
18.830769
80
0.721405
__title__ = 'htms_low_api' __version__ = '2.3.1' __author__ = 'Arslan Aliev' __license__ = 'Apache License, Version 2.0' __copyright__ = 'Copyright (c) 2018-2021 Arslan S. Aliev' from .htms_par_low import ( PAGESIZE1, NUMPAGES1, MAXSTRLEN1, PAGESIZE2, NUMPAGES2, SERVER_IP_DNS, MAIN_SERVER_PORT, HTDB_ROOT,...
0
0
0
0
0
0
0
43
0
8e4c45fc7da55a4a121aa551144811ff986b3798
10,747
py
Python
src/mysettings.py
take5553/face-check
82b859cdcb339b16ac4dca2216efda1bd5b54bff
[ "MIT" ]
1
2022-03-15T11:26:38.000Z
2022-03-15T11:26:38.000Z
src/mysettings.py
take5553/face-check
82b859cdcb339b16ac4dca2216efda1bd5b54bff
[ "MIT" ]
null
null
null
src/mysettings.py
take5553/face-check
82b859cdcb339b16ac4dca2216efda1bd5b54bff
[ "MIT" ]
null
null
null
# # Copyright (c) 2021 Takeshi Yamazaki # This software is released under the MIT License, see LICENSE. #
25.527316
119
0.555132
# # Copyright (c) 2021 Takeshi Yamazaki # This software is released under the MIT License, see LICENSE. # import json import os from device_check import get_device_id, get_format, get_device_list import gst_builder class MySettings(): _camera_settings = None _capture_settings = None _canvas_sett...
0
2,351
0
7,946
0
0
0
21
282
bae9dd4a54630a008aabb69c10a8e43a5e1571d1
402
py
Python
PythonExe/ex038.py
ScnMatheus/my-python-projects
9cc3511dd6e25d9b16429347598c105f15bd6916
[ "MIT" ]
null
null
null
PythonExe/ex038.py
ScnMatheus/my-python-projects
9cc3511dd6e25d9b16429347598c105f15bd6916
[ "MIT" ]
null
null
null
PythonExe/ex038.py
ScnMatheus/my-python-projects
9cc3511dd6e25d9b16429347598c105f15bd6916
[ "MIT" ]
null
null
null
#Escreva um programa que leia dois nmeros inteiros e compare-os # indicando qual o maior nmero, menor ou se so iguais num1 = int(input('Digite um nmero: ')) num2 = int(input('Digite outro nmero: ')) if num1 > num2: print(f'O nmero {num1} maior que o nmero {num2}') elif num2 > num1: print(f'O nmero: {num2} m...
33.5
64
0.691542
#Escreva um programa que leia dois números inteiros e compare-os # indicando qual o maior número, menor ou se são iguais num1 = int(input('Digite um número: ')) num2 = int(input('Digite outro número: ')) if num1 > num2: print(f'O número {num1} é maior que o número {num2}') elif num2 > num1: print(f'O número: ...
24
0
0
0
0
0
0
0
0
fc5c2d1c5b97a7290e287a3fb4bb4e5a0a6063c7
4,781
py
Python
train.py
tompoek/dsnd1-proj-imgclf
5ac6fa34de86ef0bffc0c83ca5e5cb13bb921d6b
[ "MIT" ]
null
null
null
train.py
tompoek/dsnd1-proj-imgclf
5ac6fa34de86ef0bffc0c83ca5e5cb13bb921d6b
[ "MIT" ]
null
null
null
train.py
tompoek/dsnd1-proj-imgclf
5ac6fa34de86ef0bffc0c83ca5e5cb13bb921d6b
[ "MIT" ]
null
null
null
import torch, argparse, sys from torch import nn, optim from torchvision import datasets, transforms, models from my_model import MyClassifier, save_checkpoint parser = argparse.ArgumentParser(description='IMAGE CLASSIFICATION TRAINER, PLEASE PROVIDE DIRECTORY WITH IMAGE DATA') parser.add_argument('data_dir', type=str...
39.841667
201
0.726626
import torch, argparse, sys from torch import nn, optim from torchvision import datasets, transforms, models from my_model import MyClassifier, save_checkpoint parser = argparse.ArgumentParser(description='IMAGE CLASSIFICATION TRAINER, PLEASE PROVIDE DIRECTORY WITH IMAGE DATA') parser.add_argument('data_dir', type=str...
0
0
0
0
0
0
0
0
0
e20325fb8c57358d892dd670970ae548bdfde77c
52
py
Python
earth_enterprise/src/server/wsgi/serve/push/search/__init__.py
ezeeyahoo/earthenterprise
b6cac9e6228946f2f17d1edb75e118aeb3e8e8c9
[ "Apache-2.0" ]
2,661
2017-03-20T22:12:50.000Z
2022-03-30T09:43:19.000Z
earth_enterprise/src/server/wsgi/serve/push/search/__init__.py
ezeeyahoo/earthenterprise
b6cac9e6228946f2f17d1edb75e118aeb3e8e8c9
[ "Apache-2.0" ]
1,531
2017-03-24T17:20:32.000Z
2022-03-16T18:11:14.000Z
earth_enterprise/src/server/wsgi/serve/push/search/__init__.py
ezeeyahoo/earthenterprise
b6cac9e6228946f2f17d1edb75e118aeb3e8e8c9
[ "Apache-2.0" ]
990
2017-03-24T11:54:28.000Z
2022-03-22T11:51:47.000Z
"""The package indicator for serve.push.search."""
17.333333
50
0.711538
"""The package indicator for serve.push.search."""
0
0
0
0
0
0
0
0
0
a7fcbbad0b7a1b74f6d72234f08565017e74fc2f
482
py
Python
src/alembic/versions/fd05599e10a6_add_identity_file.py
grihabor/teser
93ecc60a6952313c6fbb10de3b1cc0647899e9e8
[ "BSD-3-Clause" ]
null
null
null
src/alembic/versions/fd05599e10a6_add_identity_file.py
grihabor/teser
93ecc60a6952313c6fbb10de3b1cc0647899e9e8
[ "BSD-3-Clause" ]
null
null
null
src/alembic/versions/fd05599e10a6_add_identity_file.py
grihabor/teser
93ecc60a6952313c6fbb10de3b1cc0647899e9e8
[ "BSD-3-Clause" ]
null
null
null
"""empty message Revision ID: fd05599e10a6 Revises: 8a04dc559206 Create Date: 2017-08-22 14:26:50.486659 """ # revision identifiers, used by Alembic. revision = 'fd05599e10a6' down_revision = '8a04dc559206' branch_labels = None depends_on = None
19.28
98
0.748963
"""empty message Revision ID: fd05599e10a6 Revises: 8a04dc559206 Create Date: 2017-08-22 14:26:50.486659 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = 'fd05599e10a6' down_revision = '8a04dc559206' branch_labels = None depends_on = None def upgrade(): op...
0
0
0
0
0
137
0
3
90
6b50f513410dc084491665be9622064316a40d58
3,741
py
Python
openGaussBase/testcase/SQL/DATATYPE/jsonb/Opengauss_Function_Datatype_Jsonb_Case0035.py
opengauss-mirror/Yat
aef107a8304b94e5d99b4f1f36eb46755eb8919e
[ "MulanPSL-1.0" ]
null
null
null
openGaussBase/testcase/SQL/DATATYPE/jsonb/Opengauss_Function_Datatype_Jsonb_Case0035.py
opengauss-mirror/Yat
aef107a8304b94e5d99b4f1f36eb46755eb8919e
[ "MulanPSL-1.0" ]
null
null
null
openGaussBase/testcase/SQL/DATATYPE/jsonb/Opengauss_Function_Datatype_Jsonb_Case0035.py
opengauss-mirror/Yat
aef107a8304b94e5d99b4f1f36eb46755eb8919e
[ "MulanPSL-1.0" ]
null
null
null
""" Copyright (c) 2022 Huawei Technologies Co.,Ltd. openGauss is licensed under Mulan PSL v2. You can use this software according to the terms and conditions of the Mulan PSL v2. You may obtain a copy of Mulan PSL v2 at: http://license.coscl.org.cn/MulanPSL2 THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, W...
38.173469
84
0.535151
""" Copyright (c) 2022 Huawei Technologies Co.,Ltd. openGauss is licensed under Mulan PSL v2. You can use this software according to the terms and conditions of the Mulan PSL v2. You may obtain a copy of Mulan PSL v2 at: http://license.coscl.org.cn/MulanPSL2 THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, W...
411
0
0
2,677
0
0
0
47
135
c4054c8555d288d7b735b5aae1ffa3d1ec84e43f
697
py
Python
development/server/documents/common.py
FMsunyh/re_com
1510881bce07a2750c47834b6520d90f2f4ed254
[ "MIT" ]
null
null
null
development/server/documents/common.py
FMsunyh/re_com
1510881bce07a2750c47834b6520d90f2f4ed254
[ "MIT" ]
11
2020-01-28T22:29:48.000Z
2022-03-11T23:29:39.000Z
development/server/documents/common.py
FMsunyh/re_com
1510881bce07a2750c47834b6520d90f2f4ed254
[ "MIT" ]
null
null
null
from flask_restplus import reqparse from server import api request_parser = reqparse.RequestParser() request_parser.add_argument('token', type=str, required=True, location='headers') request_token = api.expect(request_parser, validate=True)
36.684211
82
0.695839
from flask_restplus import reqparse from flask_restplus import fields from server import api from server.status import APIStatus, to_http_status def build_response(name, data): return api.response(code=to_http_status(APIStatus.Ok), model=api.model(name, { 'status': fields.Integer(description...
60
0
0
0
0
323
0
42
67
0d57e79c1b7bd7e669f04513eb010415d49b54ce
10,851
py
Python
scripts/list_file_entries.py
joachimmetz/dfvfs-snippets
787a858e7e008fc44a0b78703dff2cb9236f7c0a
[ "Apache-2.0" ]
null
null
null
scripts/list_file_entries.py
joachimmetz/dfvfs-snippets
787a858e7e008fc44a0b78703dff2cb9236f7c0a
[ "Apache-2.0" ]
null
null
null
scripts/list_file_entries.py
joachimmetz/dfvfs-snippets
787a858e7e008fc44a0b78703dff2cb9236f7c0a
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- """Script to list file entries.""" import argparse import logging import sys from dfvfs.analyzer import analyzer from dfvfs.analyzer import fvde_analyzer_helper from dfvfs.helpers import command_line from dfvfs.helpers import volume_scanner from dfvfs.lib import errors fr...
30.310056
85
0.680582
#!/usr/bin/env python # -*- coding: utf-8 -*- """Script to list file entries.""" import abc import argparse import logging import sys from dfvfs.analyzer import analyzer from dfvfs.analyzer import fvde_analyzer_helper from dfvfs.helpers import command_line from dfvfs.helpers import volume_scanner from dfvfs.lib impor...
0
234
0
5,712
0
0
0
36
159
c9dcc0a148352e5dcae7f550e00cfb4fd3d33007
2,297
py
Python
stanCode_Project/break_out_game/breakout.py
ifanchang/stancode_101
52d3834c8a94e02c09f7d2e10eca0a6f1582816f
[ "MIT" ]
null
null
null
stanCode_Project/break_out_game/breakout.py
ifanchang/stancode_101
52d3834c8a94e02c09f7d2e10eca0a6f1582816f
[ "MIT" ]
null
null
null
stanCode_Project/break_out_game/breakout.py
ifanchang/stancode_101
52d3834c8a94e02c09f7d2e10eca0a6f1582816f
[ "MIT" ]
null
null
null
""" stanCode Breakout Project Adapted from Eric Roberts's Breakout by Sonja Johnson-Yu, Kylie Jue, Nick Bowman, and Jerry Liao. YOUR DESCRIPTION HERE This is a breakout game. """ FRAME_RATE = 1000 / 120 # 120 frames per second NUM_LIVES = 3 # Number of attempts if __name__ == '__main__': main()
28.012195
102
0.607749
""" stanCode Breakout Project Adapted from Eric Roberts's Breakout by Sonja Johnson-Yu, Kylie Jue, Nick Bowman, and Jerry Liao. YOUR DESCRIPTION HERE This is a breakout game. """ from campy.gui.events.timer import pause from breakoutgraphics import BreakoutGraphics FRAME_RATE = 1000 / 120 # 120 frames per second NU...
0
0
0
0
0
1,875
0
43
68
516b7c25c5650aeb33f7879e0a9516375602921b
2,328
py
Python
python/scripts/tools/m3qa_eeprom_sn.py
ahoarau/m3meka
237739f0266ce60aaa3013b0d2b22fc07b6374c4
[ "MIT" ]
1
2015-06-19T12:14:18.000Z
2015-06-19T12:14:18.000Z
python/scripts/tools/m3qa_eeprom_sn.py
semeyerz/m3meka
6e5d6b73ad3ebdd8429497923e601eae65d8b2fe
[ "MIT" ]
null
null
null
python/scripts/tools/m3qa_eeprom_sn.py
semeyerz/m3meka
6e5d6b73ad3ebdd8429497923e601eae65d8b2fe
[ "MIT" ]
2
2015-11-27T09:25:54.000Z
2021-08-16T16:29:22.000Z
#! /usr/bin/python #M3 -- Meka Robotics Robot Components #Copyright (c) 2010 Meka Robotics #Author: edsinger@mekabot.com (Aaron Edsinger) #M3 is free software: you can redistribute it and/or modify #it under the terms of the GNU Lesser General Public License as published by #the Free Software Foundation, either versi...
31.890411
80
0.665378
#! /usr/bin/python #M3 -- Meka Robotics Robot Components #Copyright (c) 2010 Meka Robotics #Author: edsinger@mekabot.com (Aaron Edsinger) #M3 is free software: you can redistribute it and/or modify #it under the terms of the GNU Lesser General Public License as published by #the Free Software Foundation, either versi...
0
0
0
0
0
0
0
2
22
d3f4a4bbea8a59b398c702cb337e30a29cbcc5ee
492
py
Python
idb/grpc/types.py
doc22940/idb
8eb2d82c6b560a5c243986da28124245284e65e9
[ "MIT" ]
1
2015-10-09T05:49:03.000Z
2015-10-09T05:49:03.000Z
idb/grpc/types.py
sunlight2728/FBSimulatorControl
6fd02165bc8252cfdb8efe2bf98f370e73d7902c
[ "MIT" ]
5
2021-09-02T15:20:04.000Z
2022-02-27T09:50:05.000Z
idb/grpc/types.py
Rezduan83/idb
a43b499302a37ada164cd183b9edb0e3a4699a1d
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree.
24.6
65
0.764228
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. from logging import Logger from typing import NamedTuple, Optional from idb.grpc.idb_grpc import CompanionServiceStub...
0
0
0
147
0
0
0
52
91
187c2a6d0bbace6b80c7152abaf731b60e10812a
2,045
py
Python
tests/test_cnn/test_revert_syncbn.py
imabackstabber/mmcv
b272c09b463f00fd7fdd455f7bd4a055f9995521
[ "Apache-2.0" ]
null
null
null
tests/test_cnn/test_revert_syncbn.py
imabackstabber/mmcv
b272c09b463f00fd7fdd455f7bd4a055f9995521
[ "Apache-2.0" ]
null
null
null
tests/test_cnn/test_revert_syncbn.py
imabackstabber/mmcv
b272c09b463f00fd7fdd455f7bd4a055f9995521
[ "Apache-2.0" ]
null
null
null
# Copyright (c) OpenMMLab. All rights reserved. import platform if platform.system() == 'Windows': import regex as re else:
32.983871
79
0.648411
# Copyright (c) OpenMMLab. All rights reserved. import os import platform import numpy as np import pytest import torch import torch.distributed as dist from mmcv.cnn.bricks import ConvModule from mmcv.cnn.utils import revert_sync_batchnorm if platform.system() == 'Windows': import regex as re else: import r...
0
413
0
0
0
1,262
0
11
228
b484ed631d6f33f581345e240cfdb2c353330420
4,109
py
Python
distances/hamming.py
FilippoPisello/Stat-utils
61f9d95ef6eaac419fd48ecf08d4b374c10087de
[ "MIT" ]
null
null
null
distances/hamming.py
FilippoPisello/Stat-utils
61f9d95ef6eaac419fd48ecf08d4b374c10087de
[ "MIT" ]
null
null
null
distances/hamming.py
FilippoPisello/Stat-utils
61f9d95ef6eaac419fd48ecf08d4b374c10087de
[ "MIT" ]
null
null
null
from typing import Union import numpy as np def hamming_from_elements( array: np.ndarray, elements: np.ndarray, weight: Union[float, int, np.ndarray] = 1 ) -> np.ndarray: """Return an array of array made of the hamming distances between each element and each of the specified points. The hamming dist...
38.401869
86
0.664152
from typing import Union import numpy as np def hamming_from_elements( array: np.ndarray, elements: np.ndarray, weight: Union[float, int, np.ndarray] = 1 ) -> np.ndarray: """Return an array of array made of the hamming distances between each element and each of the specified points. The hamming dist...
0
0
0
0
0
0
0
0
0
59259301b693a460277dfb332c1f19419c089350
766
py
Python
bozkurt-ftp.py
B3zkurt/bozkurt-ftp
2663317b5e451b2fa49e240c936a1e95b629a9c9
[ "Apache-2.0" ]
null
null
null
bozkurt-ftp.py
B3zkurt/bozkurt-ftp
2663317b5e451b2fa49e240c936a1e95b629a9c9
[ "Apache-2.0" ]
null
null
null
bozkurt-ftp.py
B3zkurt/bozkurt-ftp
2663317b5e451b2fa49e240c936a1e95b629a9c9
[ "Apache-2.0" ]
1
2022-02-11T18:25:47.000Z
2022-02-11T18:25:47.000Z
import os import time os.system("clear") print("################################") print(" ") print(" Bozkurt Ftp Bf Toolu ") print(" ") print("################################") print() print("1.Ftp Brute Force") print("2.Kullanm K...
29.461538
207
0.556136
import os import time os.system("clear") print("################################") print(" ") print(" Bozkurt Ftp Bf Toolu ") print(" ") print("################################") print() print("1.Ftp Brute Force") print("2.Kullanım ...
66
0
0
0
0
0
0
0
0
de72b5096927dd3f6e939e05e71e4b84f027aa56
7,141
py
Python
noahmp_new_case.py
ESMWG/noahmp-tools
818b6d874f2981098dd3ad1ee239c88ee4743892
[ "Apache-2.0" ]
5
2019-04-04T03:14:40.000Z
2021-07-29T03:22:11.000Z
noahmp_new_case.py
woolf1988/noahmp-tools
818b6d874f2981098dd3ad1ee239c88ee4743892
[ "Apache-2.0" ]
null
null
null
noahmp_new_case.py
woolf1988/noahmp-tools
818b6d874f2981098dd3ad1ee239c88ee4743892
[ "Apache-2.0" ]
3
2019-04-04T03:14:44.000Z
2021-12-10T07:39:17.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # create Noah-MP case # author: Hui ZHENG import os.path NOAHMP_NML = 'namelist.hrldas.template' NOAHMP_TBLS = ['GENPARM.TBL', 'MPTABLE.TBL', 'SOILPARM.TBL', 'VEGPARM.TBL'] NOAHMP_EXE = 'noahmp_hrldas.exe' import argparse import dateutil.parser if __name__ == '__main_...
45.484076
120
0.487887
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # create Noah-MP case # author: Hui ZHENG import os.path import string import shutil NOAHMP_NML = 'namelist.hrldas.template' NOAHMP_TBLS = ['GENPARM.TBL', 'MPTABLE.TBL', 'SOILPARM.TBL', 'VEGPARM.TBL'] NOAHMP_EXE = 'noahmp_hrldas.exe' def main(modelroot=None, ...
0
0
0
0
0
4,891
0
-16
67
a9c3084b79249fcf226eeb9baec10359f8e056b5
167
py
Python
misago/misago/sso/tests/utils.py
vascoalramos/misago-deployment
20226072138403108046c0afad9d99eb4163cedc
[ "MIT" ]
2
2021-03-06T21:06:13.000Z
2021-03-09T15:05:12.000Z
misago/misago/sso/tests/utils.py
vascoalramos/misago-deployment
20226072138403108046c0afad9d99eb4163cedc
[ "MIT" ]
null
null
null
misago/misago/sso/tests/utils.py
vascoalramos/misago-deployment
20226072138403108046c0afad9d99eb4163cedc
[ "MIT" ]
null
null
null
TEST_SSO_SETTINGS = { "enable_sso": True, "sso_private_key": "priv1", "sso_public_key": "fakeSsoPublicKey", "sso_url": "http://example.com/server/", }
23.857143
44
0.646707
TEST_SSO_SETTINGS = { "enable_sso": True, "sso_private_key": "priv1", "sso_public_key": "fakeSsoPublicKey", "sso_url": "http://example.com/server/", }
0
0
0
0
0
0
0
0
0
8a34b7b3ec213b75c0a45cfd8969677bf772751f
998
py
Python
modules/finance/social_security_audit/urls.py
xuhuiliang-maybe/ace_office
07fae18676a193206802e8fb9aa32a805b1da24c
[ "Apache-2.0" ]
1
2018-11-27T08:08:07.000Z
2018-11-27T08:08:07.000Z
modules/finance/social_security_audit/urls.py
xuhuiliang-maybe/ace_office
07fae18676a193206802e8fb9aa32a805b1da24c
[ "Apache-2.0" ]
null
null
null
modules/finance/social_security_audit/urls.py
xuhuiliang-maybe/ace_office
07fae18676a193206802e8fb9aa32a805b1da24c
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 from django.conf.urls import url # - urlpatterns = [ url(r'^add$', SocialSecurityAuditCreate.as_view(), name="add_socialsecurityaudit"), # url(r'^(?P<pk>[0-9]+)/delete$', SocialSecurityAuditDelete.as_view(), name="del_socialsecurityaudit"), # url(r'^list$', SocialSecurityAuditListView.as_view(), ...
55.444444
107
0.795591
# coding=utf-8 from django.conf.urls import url from modules.finance.social_security_audit.code.add_social_security_audit import * from modules.finance.social_security_audit.code.del_social_security_audit import * from modules.finance.social_security_audit.code.edit_social_security_audit import * from modules.finance....
36
0
0
0
0
0
0
310
111
46f2b00af8f1c4f77c772643c57035e4416d9838
7,591
py
Python
Chapter09/coffee_list2.py
Orrmj/Mastering-GUI-Programming-with-Python
cba452b96551d649144e6cfe18cd90dd454ab417
[ "MIT" ]
null
null
null
Chapter09/coffee_list2.py
Orrmj/Mastering-GUI-Programming-with-Python
cba452b96551d649144e6cfe18cd90dd454ab417
[ "MIT" ]
null
null
null
Chapter09/coffee_list2.py
Orrmj/Mastering-GUI-Programming-with-Python
cba452b96551d649144e6cfe18cd90dd454ab417
[ "MIT" ]
null
null
null
import sys from PyQt5 import QtWidgets as qtw """ TODO: - Adding new reviews and new coffees """ if __name__ == '__main__': app = qtw.QApplication(sys.argv) # it's required to save a reference to MainWindow. # if it goes out of scope, it will be destroyed. mw = MainWindow() sys.exit(app.exe...
33.588496
71
0.627981
import sys from PyQt5 import QtWidgets as qtw from PyQt5 import QtCore as qtc from PyQt5 import QtGui as qtg from PyQt5 import QtSql as qts """ TODO: - Adding new reviews and new coffees """ class DateDelegate(qtw.QStyledItemDelegate): def createEditor(self, parent, option, proxyModelIndex): # make s...
0
0
0
7,103
0
0
0
28
135
ad2f140c84a65a05433bb7a6eb37b0e031434000
3,887
py
Python
actions/smtpserver.py
elastisys/layer-charmscaler-base
ab1c1152ea931edd5d1061e74414acf529b562bf
[ "Apache-2.0" ]
null
null
null
actions/smtpserver.py
elastisys/layer-charmscaler-base
ab1c1152ea931edd5d1061e74414acf529b562bf
[ "Apache-2.0" ]
null
null
null
actions/smtpserver.py
elastisys/layer-charmscaler-base
ab1c1152ea931edd5d1061e74414acf529b562bf
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3.5 import asyncio import logging import sys sys.path.append("lib") from charms.layer.basic import activate_venv # noqa: E402 activate_venv() from charmhelpers.core import hookenv # noqa: E402 if __name__ == "__main__": logging.basicConfig(level=logging.DEBUG) logging.getLogger("...
26.087248
78
0.623617
#!/usr/bin/env python3.5 import asyncio import logging import sys sys.path.append("lib") from charms.layer.basic import activate_venv # noqa: E402 activate_venv() from aiosmtpd.controller import Controller # noqa: E402 from aiosmtpd.handlers import Message # noqa: E402 from aiozmq import rpc # noqa: E402 from cha...
0
1,007
1,099
551
0
0
0
27
390
f12af4d29de7215c8ceaab22302c45d487b560c5
2,527
py
Python
mocha_common_tools.py
boris-fx/mocha-scripts
f7119b6258dadfbf47723093e50a1a7a062b7f4d
[ "BSD-3-Clause" ]
6
2021-04-24T02:12:49.000Z
2022-02-08T12:09:38.000Z
mocha_common_tools.py
boris-fx/mocha-scripts
f7119b6258dadfbf47723093e50a1a7a062b7f4d
[ "BSD-3-Clause" ]
null
null
null
mocha_common_tools.py
boris-fx/mocha-scripts
f7119b6258dadfbf47723093e50a1a7a062b7f4d
[ "BSD-3-Clause" ]
2
2021-05-18T14:17:36.000Z
2021-08-15T11:40:16.000Z
# BSD 3-Clause License # # Copyright (c) 2020, Boris FX # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, this # list...
37.716418
80
0.766522
# BSD 3-Clause License # # Copyright (c) 2020, Boris FX # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, this # list...
0
0
0
0
0
586
0
51
166
c8d0f7fa02f11fe41c311c74e10f43c19734bdea
635
py
Python
main/models.py
guanta/guanta_deploy
387b23990b5a215c2a15174d2774838e28255139
[ "Apache-2.0" ]
null
null
null
main/models.py
guanta/guanta_deploy
387b23990b5a215c2a15174d2774838e28255139
[ "Apache-2.0" ]
null
null
null
main/models.py
guanta/guanta_deploy
387b23990b5a215c2a15174d2774838e28255139
[ "Apache-2.0" ]
null
null
null
# Create your models here.
21.896552
60
0.650394
from django.db import models # Create your models here. class subscriber(models.Model): email = models.CharField(max_length = 255 , unique=True) def __str__(self): return self.email class respos(models.Model): name = models.CharField(max_length = 255 ) surname = models.CharFiel...
0
0
0
480
0
0
0
7
99
5db902a228e145362e715ff9f6a79cc2157c1890
286
py
Python
velarium/__init__.py
holthe/velarium
c16f608f1f99b1fab6b3556b2da414ea41777f80
[ "MIT" ]
2
2018-04-07T21:38:24.000Z
2020-01-22T19:14:01.000Z
velarium/__init__.py
holthe/velarium
c16f608f1f99b1fab6b3556b2da414ea41777f80
[ "MIT" ]
null
null
null
velarium/__init__.py
holthe/velarium
c16f608f1f99b1fab6b3556b2da414ea41777f80
[ "MIT" ]
null
null
null
from . import interpreter, network, process def ufw_reset(): """Reset UFW rules.""" network.ufw_reset() def main(): """Entry point for the application script.""" # We only allow a single instance process.ensure_single_instance('velarium') interpreter.run()
19.066667
49
0.674825
from . import interpreter, network, process def ufw_reset(): """Reset UFW rules.""" network.ufw_reset() def main(): """Entry point for the application script.""" # We only allow a single instance process.ensure_single_instance('velarium') interpreter.run()
0
0
0
0
0
0
0
0
0
3e157512599334ff18a4d6a857df5062842170ca
346
py
Python
snuggle/errors.py
halfak/snuggle
384818aaf8a783013b076ada3c74226f10e5dc18
[ "MIT" ]
2
2021-04-26T20:34:25.000Z
2021-11-12T11:26:57.000Z
snuggle/errors.py
halfak/snuggle
384818aaf8a783013b076ada3c74226f10e5dc18
[ "MIT" ]
null
null
null
snuggle/errors.py
halfak/snuggle
384818aaf8a783013b076ada3c74226f10e5dc18
[ "MIT" ]
null
null
null
# Web processing errors # User Actions
21.625
51
0.745665
# Web processing errors class AuthErrorPass(Exception): pass class AuthErrorName(Exception): pass class ConnectionError(Exception): pass class MWAPIError(Exception): def __init__(self, code, info): Exception.__init__(self, "%s: %s" % (code, info)) self.code = code self.info = info # User Actions class Invali...
0
0
0
194
0
0
0
0
110
1859c5837576db370feb8424428e2aee20da299a
1,616
py
Python
common/ng_template.py
cclauss/upvote
9d526fec72690cde1575dbd32dacf68cbbab81d1
[ "Apache-2.0" ]
null
null
null
common/ng_template.py
cclauss/upvote
9d526fec72690cde1575dbd32dacf68cbbab81d1
[ "Apache-2.0" ]
null
null
null
common/ng_template.py
cclauss/upvote
9d526fec72690cde1575dbd32dacf68cbbab81d1
[ "Apache-2.0" ]
null
null
null
# Copyright 2017 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
31.076923
79
0.722153
# Copyright 2017 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
0
0
0
0
0
832
0
-4
45
cf26f44be725ea4761a14e264df7ac6cb3594d09
6,449
py
Python
code/colors/colored-hist.py
geo7/scientific-visualization-book
71f6bac4db7ee2f26e88052fe7faa800303d8b00
[ "BSD-2-Clause" ]
2
2021-11-17T15:10:09.000Z
2021-12-24T13:31:10.000Z
code/colors/colored-hist.py
WuShichao/scientific-visualization-book
389766215aa6b234ed1cf560a3768437d41d1d37
[ "BSD-2-Clause" ]
1
2021-12-12T11:37:48.000Z
2021-12-12T11:39:00.000Z
code/colors/colored-hist.py
WuShichao/scientific-visualization-book
389766215aa6b234ed1cf560a3768437d41d1d37
[ "BSD-2-Clause" ]
2
2021-12-30T12:20:07.000Z
2022-02-24T06:36:41.000Z
# ---------------------------------------------------------------------------- # Title: Scientific Visualisation - Python & Matplotlib # Author: Nicolas P. Rougier # License: BSD # ---------------------------------------------------------------------------- import numpy as np import matplotlib.pyplot as plt import m...
21.713805
80
0.370755
# ---------------------------------------------------------------------------- # Title: Scientific Visualisation - Python & Matplotlib # Author: Nicolas P. Rougier # License: BSD # ---------------------------------------------------------------------------- import numpy as np import matplotlib.pyplot as plt import m...
0
0
0
0
0
394
0
0
23
5926dfed09ba36a1df5f0b74193784d8e4593e50
1,337
py
Python
small_projet/hangman/function.py
ravernhe/python_random_stuff
d9dc2cd3134fc36ff761f2aa1481c4b80568d0b2
[ "MIT" ]
null
null
null
small_projet/hangman/function.py
ravernhe/python_random_stuff
d9dc2cd3134fc36ff761f2aa1481c4b80568d0b2
[ "MIT" ]
null
null
null
small_projet/hangman/function.py
ravernhe/python_random_stuff
d9dc2cd3134fc36ff761f2aa1481c4b80568d0b2
[ "MIT" ]
null
null
null
#!/usr/bin/python # -*-coding:utf-8 -*
24.309091
79
0.6365
#!/usr/bin/python # -*-coding:utf-8 -* import os import pickle from random import choice from data import * def get_score(): if os.path.exists(name_score_file): score_file = open(name_score_file, "rb") my_depickler = pickle.Unpickler(score_file) scores = my_depickler.load() score_f...
0
0
0
0
0
1,089
0
-19
227
8c8e94c9a0d10e71278c7ba50bc937b9b091d885
5,629
py
Python
Johnson2016Perceptual/test.py
czczup/URST
000ec9f7728f12ffad989ec1d07b1dd579514133
[ "Apache-2.0" ]
119
2021-03-21T18:30:51.000Z
2022-03-29T07:28:33.000Z
Johnson2016Perceptual/test.py
czczup/URST
000ec9f7728f12ffad989ec1d07b1dd579514133
[ "Apache-2.0" ]
5
2021-04-02T14:26:03.000Z
2022-01-12T12:59:17.000Z
Johnson2016Perceptual/test.py
czczup/URST
000ec9f7728f12ffad989ec1d07b1dd579514133
[ "Apache-2.0" ]
16
2021-03-21T18:30:53.000Z
2022-03-29T07:28:34.000Z
from model_test import TransformerNet from PIL import Image import torch import argparse import os import time import sys sys.path.append("..") from tools import preprocess if __name__ == "__main__": parser = argparse.ArgumentParser() parser.add_argument("--content", type=str, required=True, help...
43.3
133
0.649671
from model_test import TransformerNet import torch.nn.functional as F from PIL import Image from tqdm import tqdm from utils import * import torch import argparse import os import time import math import sys sys.path.append("..") from tools import unpadding, preprocess from thumb_instance_norm import init_thumbnail_in...
0
0
0
0
0
1,456
0
48
183
b0c31384d07bb1f3c3f1d6d2e0992d5664a73609
2,693
py
Python
scripts/generate_sic_graphs.py
bfan1256/comarket-movements
5f7d434aa5820f3dcca2f42c3534828e00377fbd
[ "Apache-2.0" ]
5
2022-03-02T20:59:45.000Z
2022-03-03T19:28:11.000Z
scripts/generate_sic_graphs.py
bfan1256/comarket-movements
5f7d434aa5820f3dcca2f42c3534828e00377fbd
[ "Apache-2.0" ]
null
null
null
scripts/generate_sic_graphs.py
bfan1256/comarket-movements
5f7d434aa5820f3dcca2f42c3534828e00377fbd
[ "Apache-2.0" ]
null
null
null
import os import pandas as pd from glob import glob import pickle from matplotlib import pyplot as plt import seaborn as sns import pickle import numpy as np from tslearn.utils import to_time_series_dataset from tslearn.preprocessing import TimeSeriesScalerMeanVariance from tslearn.clustering import TimeSeriesKMeans...
37.929577
135
0.582993
import os import pandas as pd from glob import glob import pickle from fbprophet import Prophet from matplotlib import pyplot as plt import seaborn as sns import pickle import numpy as np from tslearn.utils import to_time_series_dataset from tslearn.preprocessing import TimeSeriesScalerMeanVariance from tslearn.clus...
0
0
0
0
0
258
0
8
45
2428a4fd984bea65de72321da74b3e50276f8e31
3,790
py
Python
sandbox/slice-reads-by-coverage.py
sadeepdarshana/khmer
bee54c4f579611d970c59367323d31d3545cafa6
[ "CNRI-Python" ]
558
2015-05-22T15:03:21.000Z
2022-03-23T04:49:17.000Z
sandbox/slice-reads-by-coverage.py
sadeepdarshana/khmer
bee54c4f579611d970c59367323d31d3545cafa6
[ "CNRI-Python" ]
1,057
2015-05-14T20:27:04.000Z
2022-03-08T09:29:36.000Z
sandbox/slice-reads-by-coverage.py
sadeepdarshana/khmer
bee54c4f579611d970c59367323d31d3545cafa6
[ "CNRI-Python" ]
193
2015-05-18T10:13:34.000Z
2021-12-10T11:58:01.000Z
#! /usr/bin/env python # This file is part of khmer, https://github.com/dib-lab/khmer/, and is # Copyright (C) 2014-2015, Michigan State University. # Copyright (C) 2015, The Regents of the University of California. # # Redistribution and use in source and binary forms, with or without # modification, are permitted pro...
36.442308
83
0.688654
#! /usr/bin/env python # This file is part of khmer, https://github.com/dib-lab/khmer/, and is # Copyright (C) 2014-2015, Michigan State University. # Copyright (C) 2015, The Regents of the University of California. # # Redistribution and use in source and binary forms, with or without # modification, are permitted pro...
0
0
0
0
0
1,854
0
-34
134
7cecb7489ec650968b34932f3b4f9c8eb8c2f623
3,763
py
Python
tools/visualize_json_results.py
Qianna00/detectron2
e8f9a6dd6f69d58ddec0fbbde1b6a185f6c4111e
[ "Apache-2.0" ]
1
2021-08-01T08:44:40.000Z
2021-08-01T08:44:40.000Z
tools/visualize_json_results.py
Qianna00/detectron2
e8f9a6dd6f69d58ddec0fbbde1b6a185f6c4111e
[ "Apache-2.0" ]
null
null
null
tools/visualize_json_results.py
Qianna00/detectron2
e8f9a6dd6f69d58ddec0fbbde1b6a185f6c4111e
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved import argparse import json import numpy as np import os from collections import defaultdict import cv2 import tqdm from fvcore.common.file_io import PathManager from detectron2.data import DatasetCatalog, MetadataCatalog fro...
38.010101
113
0.694924
#!/usr/bin/env python # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved import argparse import json import numpy as np import os from collections import defaultdict import cv2 import tqdm from fvcore.common.file_io import PathManager from detectron2.data import DatasetCatalog, MetadataCatalog fro...
0
0
0
0
0
764
0
0
84
177d2a8d43f9df27b52462867dbb85d9efe08de4
4,198
py
Python
noseselecttests/__init__.py
hayato-nomura/nose-selecttests
024b28d72830a84ed705ce8058ca6880b8c253da
[ "BSD-3-Clause" ]
null
null
null
noseselecttests/__init__.py
hayato-nomura/nose-selecttests
024b28d72830a84ed705ce8058ca6880b8c253da
[ "BSD-3-Clause" ]
null
null
null
noseselecttests/__init__.py
hayato-nomura/nose-selecttests
024b28d72830a84ed705ce8058ca6880b8c253da
[ "BSD-3-Clause" ]
3
2019-02-08T09:05:47.000Z
2020-01-05T00:16:41.000Z
import logging import six log = logging.getLogger(__name__) def objname(obj): '''Return the context qualified name of a function, method or class obj''' if hasattr(obj, 'name'): return obj.name # name proper if hasattr(obj, '__name__'): names = [obj.__name__] else: #th...
33.055118
115
0.612196
import logging from fnmatch import fnmatch import six from nose.plugins.base import Plugin from nose.selector import Selector log = logging.getLogger(__name__) class MockPlugins(object): '''Mock "plugins" that does nothing to avoid infinite recursion calls from Selector''' def wantClass(self, cls...
0
0
0
2,840
0
0
0
34
113
546124d306ea0f5331b8da9b42903b7829352171
916
py
Python
rt_gene/rt_gene_model_training/pytorch/utils/CombineGazeH5Datasets.py
martinhoang11/OpenSeeFace
c6c9b8c6c00e0e674bce781f2e372fe9109fe44b
[ "BSD-2-Clause" ]
1
2021-03-23T04:58:02.000Z
2021-03-23T04:58:02.000Z
rt_gene/rt_gene_model_training/pytorch/utils/CombineGazeH5Datasets.py
martinhoang11/OpenSeeFace
c6c9b8c6c00e0e674bce781f2e372fe9109fe44b
[ "BSD-2-Clause" ]
null
null
null
rt_gene/rt_gene_model_training/pytorch/utils/CombineGazeH5Datasets.py
martinhoang11/OpenSeeFace
c6c9b8c6c00e0e674bce781f2e372fe9109fe44b
[ "BSD-2-Clause" ]
null
null
null
import os from argparse import ArgumentParser import h5py root_dir = os.path.dirname(os.path.realpath(__file__)) root_parser = ArgumentParser(add_help=False) root_parser.add_argument('--hdf5_file', type=str, required=True, help='path to the datasets to combine', action="append") root_parser.add_argument('--save_file...
31.586207
123
0.724891
import os from argparse import ArgumentParser import h5py root_dir = os.path.dirname(os.path.realpath(__file__)) root_parser = ArgumentParser(add_help=False) root_parser.add_argument('--hdf5_file', type=str, required=True, help='path to the datasets to combine', action="append") root_parser.add_argument('--save_file...
0
0
0
0
0
0
0
0
0
7fedac847fd77f0474904414fc1ae600f359f697
5,130
py
Python
third_party/google-endpoints/Crypto/Cipher/DES3.py
tingshao/catapult
a8fe19e0c492472a8ed5710be9077e24cc517c5c
[ "BSD-3-Clause" ]
2,151
2020-04-18T07:31:17.000Z
2022-03-31T08:39:18.000Z
third_party/google-endpoints/Crypto/Cipher/DES3.py
tingshao/catapult
a8fe19e0c492472a8ed5710be9077e24cc517c5c
[ "BSD-3-Clause" ]
4,640
2015-07-08T16:19:08.000Z
2019-12-02T15:01:27.000Z
third_party/google-endpoints/Crypto/Cipher/DES3.py
tingshao/catapult
a8fe19e0c492472a8ed5710be9077e24cc517c5c
[ "BSD-3-Clause" ]
698
2015-06-02T19:18:35.000Z
2022-03-29T16:57:15.000Z
# -*- coding: utf-8 -*- # # Cipher/DES3.py : DES3 # # =================================================================== # The contents of this file are dedicated to the public domain. To # the extent that dedication to the public domain is not available, # everyone is granted a worldwide, perpetual, royalty-free, #...
38.283582
91
0.676803
# -*- coding: utf-8 -*- # # Cipher/DES3.py : DES3 # # =================================================================== # The contents of this file are dedicated to the public domain. To # the extent that dedication to the public domain is not available, # everyone is granted a worldwide, perpetual, royalty-free, #...
0
0
0
266
0
0
0
24
68
9862cb96709443616c80dacb4c1549b27d5806b6
2,334
py
Python
ipyvolume/__init__.py
wolfv/ipyvolume
5cfe5c3baf105c37611dc964ffd1b6a983032529
[ "MIT" ]
1
2019-01-31T02:43:17.000Z
2019-01-31T02:43:17.000Z
ipyvolume/__init__.py
DalavanCloud/ipyvolume
ce1546ac37a8f9a946ce0fac3ea9dcde06ff004b
[ "MIT" ]
null
null
null
ipyvolume/__init__.py
DalavanCloud/ipyvolume
ce1546ac37a8f9a946ce0fac3ea9dcde06ff004b
[ "MIT" ]
1
2019-01-31T02:43:07.000Z
2019-01-31T02:43:07.000Z
from __future__ import absolute_import
37.047619
66
0.33976
from __future__ import absolute_import from ipyvolume._version import __version__ from ipyvolume import styles from ipyvolume import examples from ipyvolume import datasets from ipyvolume import embed from ipyvolume.widgets import (Mesh, Scatter, Volume, ...
0
0
0
0
0
159
0
1,936
200
f8eff9fa044a3fecc9cab555ef3849feb080797a
3,555
py
Python
chapter_07/random_walk.py
linklab/link_rl_book_codes
b272b46d5ecd2802f34648440ff53641c68cbbf0
[ "MIT" ]
null
null
null
chapter_07/random_walk.py
linklab/link_rl_book_codes
b272b46d5ecd2802f34648440ff53641c68cbbf0
[ "MIT" ]
7
2020-11-13T18:57:32.000Z
2022-02-10T01:52:44.000Z
chapter_07/random_walk.py
linklab/link_rl_book_codes
b272b46d5ecd2802f34648440ff53641c68cbbf0
[ "MIT" ]
1
2021-09-07T12:41:33.000Z
2021-09-07T12:41:33.000Z
import numpy as np import matplotlib as mpl import matplotlib.pyplot as plt plt.rcParams["font.family"] = 'NanumBarunGothic' plt.rcParams["font.size"] = 12 mpl.rcParams['axes.unicode_minus'] = False # ( ) N_STATES = 19 # GAMMA = 1 # STATES = np.arange(1, N_STATES + 1) # START_STATE = 10 # # (...
25.212766
114
0.523769
import numpy as np import matplotlib as mpl import matplotlib.pyplot as plt plt.rcParams["font.family"] = 'NanumBarunGothic' plt.rcParams["font.size"] = 12 mpl.rcParams['axes.unicode_minus'] = False # 모든 상태의 개수 (종료 상태 제외) N_STATES = 19 # 감가율 GAMMA = 1 # 종료 상태를 제외한 모든 상태 STATES = np.arange(1, N_STATES + 1) # 초기 상태 ...
969
0
0
0
0
2,583
0
0
45
33f335bd045410797ade92a111bceddca26e2cc5
3,560
py
Python
PolSAR_distance_metric.py
yoyoyoohh/PolSAR_unsupervised_CD
063986eb6fa172e861ccc556bf8806767bc89624
[ "Apache-2.0" ]
3
2021-10-14T03:49:37.000Z
2022-02-16T01:16:08.000Z
PolSAR_distance_metric.py
slchenchn/PolSAR-unsupervised-change-detection
e5788d59c7d209546216b7d4e3ed1931a1bed816
[ "Apache-2.0" ]
null
null
null
PolSAR_distance_metric.py
slchenchn/PolSAR-unsupervised-change-detection
e5788d59c7d209546216b7d4e3ed1931a1bed816
[ "Apache-2.0" ]
3
2021-07-04T08:24:56.000Z
2022-02-09T14:08:50.000Z
''' Author: Shuailin Chen Created Date: 2021-05-18 Last Modified: 2021-05-19 content: adapt from Song Hui's matlab code ''' import numpy as np from mylib import polSAR_utils as psr def determinant(A): ''' Calculate determinant of a C3 matrix Args: A (ndarray): PolSAR data Returns: det...
29.421488
114
0.467697
''' Author: Shuailin Chen Created Date: 2021-05-18 Last Modified: 2021-05-19 content: adapt from Song Hui's matlab code ''' import os.path as osp import numpy as np from mylib import polSAR_utils as psr def determinant(A): ''' Calculate determinant of a C3 matrix Args: A (ndarray): PolSAR data ...
0
0
0
0
0
0
0
0
23
1042923fa2ea1cefa57096d64ecbf73396befaa7
8,795
py
Python
evosoro/base.py
DanielLinsc/evosoro
6e9e584d3af4c1e0b50594d3c180ca838f343c54
[ "MIT" ]
1
2021-02-16T23:04:43.000Z
2021-02-16T23:04:43.000Z
evosoro/base.py
DanielLinsc/evosoro
6e9e584d3af4c1e0b50594d3c180ca838f343c54
[ "MIT" ]
null
null
null
evosoro/base.py
DanielLinsc/evosoro
6e9e584d3af4c1e0b50594d3c180ca838f343c54
[ "MIT" ]
null
null
null
# TODO: classes should hold dictionaries of variables, vxa tags and values # TODO: remove most of the hard coded text from read_write_voxelyze.py and replace with a few loops # TODO: add method to VoxCadParams for organizing (nested) subsections in vxa files
44.872449
120
0.652189
from evosoro.tools.utils import xml_format import numpy as np # TODO: classes should hold dictionaries of variables, vxa tags and values # TODO: remove most of the hard coded text from read_write_voxelyze.py and replace with a few loops # TODO: add method to VoxCadParams for organizing (nested) subsections in vxa fil...
0
0
0
8,352
0
0
0
18
159
4eb5a5c8098b88796228a9a8c0a0b54af34ce005
1,115
py
Python
project2.py
ballisticpotato/Python-Data-Analysis-Project
4a4efd0a816fe280e049ce44ba409fcee15b9ccb
[ "MIT" ]
1
2019-10-30T20:36:24.000Z
2019-10-30T20:36:24.000Z
project2.py
ballisticpotato/Python-Data-Analysis-Project
4a4efd0a816fe280e049ce44ba409fcee15b9ccb
[ "MIT" ]
null
null
null
project2.py
ballisticpotato/Python-Data-Analysis-Project
4a4efd0a816fe280e049ce44ba409fcee15b9ccb
[ "MIT" ]
null
null
null
from sklearn.kernel_ridge import KernelRidge import numpy as np import csv rawData = np.zeros((4104,4)) with open('Processed Time Dependent Data.csv', 'rb') as f: reader = csv.reader(f) labels = reader.next() i = 0 for row in reader: for j in range(4): rawData[i,j] = float(row[j])...
24.23913
90
0.619731
from sklearn.kernel_ridge import KernelRidge from sklearn.grid_search import GridSearchCV import numpy as np import csv rawData = np.zeros((4104,4)) with open('Processed Time Dependent Data.csv', 'rb') as f: reader = csv.reader(f) labels = reader.next() i = 0 for row in reader: for j in range...
0
0
0
0
0
0
0
23
22
1d90bd3f3f12955cb3b182b9e43f0813a1edb8be
3,564
py
Python
minikts/parsing.py
konodyuk/minikts
9ffb978e2048a11f118a5b4f5eed46d66fa5fb08
[ "MIT" ]
1
2021-03-13T16:48:03.000Z
2021-03-13T16:48:03.000Z
minikts/parsing.py
konodyuk/minikts
9ffb978e2048a11f118a5b4f5eed46d66fa5fb08
[ "MIT" ]
null
null
null
minikts/parsing.py
konodyuk/minikts
9ffb978e2048a11f118a5b4f5eed46d66fa5fb08
[ "MIT" ]
null
null
null
import sys from contextlib import redirect_stdout original_stdout = sys.stdout def parse_stdout(patterns, *callbacks): """Parses each stdout line in line with `patterns` argument and sequentially calls callbacks Args: patterns: tuple of patterns compatible with `parse.search` function *callba...
41.44186
105
0.618406
import sys import attr import parse from contextlib import redirect_stdout original_stdout = sys.stdout @attr.s() class StreamParser: patterns = attr.ib() buf = attr.ib(factory=str, init=False) callbacks = attr.ib(default=[print]) def write(self, b): self.buf += b if self.buf.find('\n...
0
755
0
1,737
0
0
0
-19
90
bc22db7471ca30446f0c0320f6f10f83823c0ae3
705
py
Python
tests/test_set_questions_file_path.py
MTelford/diary-tool
27e941c330d46f6e6a5817ad3006855205a041ae
[ "MIT" ]
null
null
null
tests/test_set_questions_file_path.py
MTelford/diary-tool
27e941c330d46f6e6a5817ad3006855205a041ae
[ "MIT" ]
10
2021-08-16T22:52:29.000Z
2021-09-17T15:14:34.000Z
tests/test_set_questions_file_path.py
MTelford/diary_tool
27e941c330d46f6e6a5817ad3006855205a041ae
[ "MIT" ]
null
null
null
import unittest if __name__ == '__main__': unittest.main()
27.115385
72
0.695035
import unittest import pathlib from diary_tool_main.diary_tool import set_questions_file_path class TestSetQuestionsFilePath(unittest.TestCase): def test_set_questions_file_path(self): """ Tests that function sets file path for questions correctly """ # actual path to funct...
0
0
0
538
0
0
0
34
67
21c50fbbf90c0191cf46b4687cdd84aa9ec94a2c
7,268
py
Python
gammapy/detect/cwt.py
zblz/gammapy
49539f25886433abeedc8852387ab4cd73977006
[ "BSD-3-Clause" ]
null
null
null
gammapy/detect/cwt.py
zblz/gammapy
49539f25886433abeedc8852387ab4cd73977006
[ "BSD-3-Clause" ]
null
null
null
gammapy/detect/cwt.py
zblz/gammapy
49539f25886433abeedc8852387ab4cd73977006
[ "BSD-3-Clause" ]
null
null
null
# Licensed under a 3-clause BSD style license - see LICENSE.rst from __future__ import print_function, division import numpy as np __all__ = ['CWT'] def gauss_kernel(radius, n_sigmas=8): """Normalized 2D gauss kernel array. """ sizex = int(n_sigmas * radius) sizey = int(n_sigmas * radius) radius ...
37.658031
103
0.592873
# Licensed under a 3-clause BSD style license - see LICENSE.rst from __future__ import print_function, division import logging import numpy as np from astropy.io import fits from astropy.wcs import WCS __all__ = ['CWT'] def gauss_kernel(radius, n_sigmas=8): """Normalized 2D gauss kernel array. """ sizex ...
0
0
0
5,888
0
0
0
5
89
ff1864b9e1aeedced66a6bc9d8f7093ad8f1e465
19,744
py
Python
src/widgettree.py
pariahsoft/Driftwood
fc5a8705031a4a676d2cb1132e33ee6aac45d5be
[ "MIT" ]
14
2018-06-30T15:37:20.000Z
2022-01-14T01:27:04.000Z
src/widgettree.py
seisatsu/Driftwood
fc5a8705031a4a676d2cb1132e33ee6aac45d5be
[ "MIT" ]
143
2016-10-08T22:52:52.000Z
2017-10-09T08:59:11.000Z
src/widgettree.py
driftwoodwg/Driftwood
fc5a8705031a4a676d2cb1132e33ee6aac45d5be
[ "MIT" ]
null
null
null
#################################### # Driftwood 2D Game Dev. Suite # # widgettree.py # # Copyright 2014-2017 # # Michael D. Reiley & Paul Merrill # #################################### # ********** # Permission is hereby granted, free of charge, to any person obtaining a copy # of ...
42.921739
117
0.531098
#################################### # Driftwood 2D Game Dev. Suite # # widgettree.py # # Copyright 2014-2017 # # Michael D. Reiley & Paul Merrill # #################################### # ********** # Permission is hereby granted, free of charge, to any person obtaining a copy # of ...
0
0
0
18,337
0
0
0
11
91
bb48fe039574e1042513b5009d411aa8bd65eed1
2,616
py
Python
mushroom-app/data-collector/cli.py
TangJiahui/AC215-Advanced_Practical_Data_Science
904e595630ddb9b2348889ce0d2cc777bb90f071
[ "MIT" ]
null
null
null
mushroom-app/data-collector/cli.py
TangJiahui/AC215-Advanced_Practical_Data_Science
904e595630ddb9b2348889ce0d2cc777bb90f071
[ "MIT" ]
null
null
null
mushroom-app/data-collector/cli.py
TangJiahui/AC215-Advanced_Practical_Data_Science
904e595630ddb9b2348889ce0d2cc777bb90f071
[ "MIT" ]
null
null
null
"""Downloading the images from Firefox based on the search term specified This scripts scrapes Firefox and downloads Google images of different images Typical usage example from command line: python -m cli --nums 10 --search "oyster mushrooms" "crimini mushrooms" "amanita mushrooms" --opp "search" """...
39.044776
114
0.659021
"""Downloading the images from Firefox based on the search term specified This scripts scrapes Firefox and downloads Google images of different images Typical usage example from command line: python -m cli --nums 10 --search "oyster mushrooms" "crimini mushrooms" "amanita mushrooms" --opp "search" """...
0
0
0
0
0
1,204
0
12
89
062aaee8df921f1852a3fb8715afd38dc987dcd1
3,917
py
Python
karp/domain/index.py
spraakbanken/karp-backend-v6-tmp
e5b78157bd999df18c188973ae2a337015b6f35d
[ "MIT" ]
1
2021-12-08T15:33:42.000Z
2021-12-08T15:33:42.000Z
karp/domain/index.py
spraakbanken/karp-backend-v6-tmp
e5b78157bd999df18c188973ae2a337015b6f35d
[ "MIT" ]
null
null
null
karp/domain/index.py
spraakbanken/karp-backend-v6-tmp
e5b78157bd999df18c188973ae2a337015b6f35d
[ "MIT" ]
null
null
null
import logging logger = logging.getLogger("karp")
27.978571
98
0.648966
import abc import typing from karp.domain.models.resource import Resource from typing import Optional, Callable, TypeVar, List, Dict, Tuple import logging import attr import pydantic from karp.domain import errors, model from karp.domain.errors import ConfigurationError from karp.domain.models.query import Query fro...
0
1,403
0
2,045
0
0
0
122
292
d82aebdeb4fda0b4feb795961248783bbc4e128f
2,431
py
Python
user.py
vlee489/Turnip-Bot
2571846607d6ca57171325211c5eb6572013c767
[ "MIT" ]
5
2020-04-19T22:47:28.000Z
2020-06-01T04:37:12.000Z
user.py
vlee489/Turnip-Bot
2571846607d6ca57171325211c5eb6572013c767
[ "MIT" ]
7
2020-04-21T23:25:20.000Z
2021-04-20T07:50:11.000Z
user.py
vlee489/Turnip-Bot
2571846607d6ca57171325211c5eb6572013c767
[ "MIT" ]
null
null
null
""" This file contains commands related to user configuration and management. """
45.867925
107
0.517483
""" This file contains commands related to user configuration and management. """ from discord.ext import commands, tasks import discord import errors import turnipCalculator import datetime class Users(commands.Cog): def __init__(self, bot): self.bot = bot self.pendingDelete = [] @tasks.loop...
0
2,027
0
143
0
22
0
-1
156
ff31b9b80a371f2d81a6e87536f86de304bbe09f
2,261
py
Python
matchreporter/matchreporter_cli.py
moynihanrory/matchreporter
c71d2332fde6e83a0d6cb554af9f3fd7082a4ea6
[ "MIT" ]
null
null
null
matchreporter/matchreporter_cli.py
moynihanrory/matchreporter
c71d2332fde6e83a0d6cb554af9f3fd7082a4ea6
[ "MIT" ]
null
null
null
matchreporter/matchreporter_cli.py
moynihanrory/matchreporter
c71d2332fde6e83a0d6cb554af9f3fd7082a4ea6
[ "MIT" ]
null
null
null
import sys import logging import os SPORTS_CODE = 'SportsCode' GAA_MATCH = 'GAAMatch' PACKAGE_PARENT = '..' SCRIPT_DIR = os.path.dirname(os.path.realpath(os.path.join(os.getcwd(), os.path.expanduser(__file__)))) sys.path.append(os.path.normpath(os.path.join(SCRIPT_DIR, PACKAGE_PARENT))) if __name__ == "__main__"...
31.84507
122
0.728881
import sys import logging import argparse import os from matchreporter.analysis.analyser import analyse from matchreporter.collect import scxmlformatter, gaamatchformatter from matchreporter.db.analysis_db import write_report_data from matchreporter.helpers.filehelper import load_data_from_file SPORTS_CODE = 'SportsC...
0
0
0
0
0
1,545
0
150
157
6b3e24e58e12c891c4d93a70c22683dddcd08cf8
1,753
py
Python
tests/numpy/linalg_test.py
Walon1998/dace
95ddfd3e9a5c654f0f0d66d026e0b64ec0f028a0
[ "BSD-3-Clause" ]
1
2022-03-11T13:36:34.000Z
2022-03-11T13:36:34.000Z
tests/numpy/linalg_test.py
Walon1998/dace
95ddfd3e9a5c654f0f0d66d026e0b64ec0f028a0
[ "BSD-3-Clause" ]
null
null
null
tests/numpy/linalg_test.py
Walon1998/dace
95ddfd3e9a5c654f0f0d66d026e0b64ec0f028a0
[ "BSD-3-Clause" ]
null
null
null
# Copyright 2019-2021 ETH Zurich and the DaCe authors. All rights reserved. if __name__ == "__main__": test_linalg_inv() test_linalg_solve() test_linalg_cholesky()
24.013699
75
0.662864
# Copyright 2019-2021 ETH Zurich and the DaCe authors. All rights reserved. import dace import numpy as np import pytest def generate_invertible_matrix(size, dtype): if dtype == np.float32: tol = 1e-6 elif dtype == np.float64: tol = 1e-12 else: raise NotImplementedError while T...
0
232
0
0
0
1,082
0
-21
273
8aa26b6c6e55cf8c288eb1f9ca6da84d75882d3f
1,528
py
Python
tests/test_userList.py
konung-yaropolk/pyABF
b5620e73ac5d060129b844da44f8b2611536ac56
[ "MIT" ]
74
2017-11-06T17:53:48.000Z
2022-03-27T12:14:46.000Z
tests/test_userList.py
konung-yaropolk/pyABF
b5620e73ac5d060129b844da44f8b2611536ac56
[ "MIT" ]
116
2018-01-16T21:36:29.000Z
2022-03-31T11:46:04.000Z
tests/test_userList.py
konung-yaropolk/pyABF
b5620e73ac5d060129b844da44f8b2611536ac56
[ "MIT" ]
30
2018-06-28T13:19:53.000Z
2022-03-25T02:52:48.000Z
""" This file tests retrieval of values from the user list. The user list replaces one cell in the waveform editor for episodic files. Instead of using a value and a delta, the user can provide a list of values to apply by sweep. """ import sys try: # this ensures pyABF is imported from this specific path sy...
30.56
118
0.650524
""" This file tests retrieval of values from the user list. The user list replaces one cell in the waveform editor for episodic files. Instead of using a value and a delta, the user can provide a list of values to apply by sweep. """ import sys import pytest import numpy as np try: # this ensures pyABF is import...
0
1,025
0
0
0
0
0
-20
116
dd63c5d273cef1d1f31b196ac37b6593b96ac9bd
906
py
Python
python_tutor/11_dictionary/elections.py
ctatuk/pylearn
29566b75c14f867bd7e8fc19c236e9be4f9f5203
[ "Apache-2.0" ]
null
null
null
python_tutor/11_dictionary/elections.py
ctatuk/pylearn
29566b75c14f867bd7e8fc19c236e9be4f9f5203
[ "Apache-2.0" ]
2
2020-05-16T14:46:50.000Z
2020-06-20T16:35:37.000Z
python_tutor/11_dictionary/elections.py
ctatuk/pylearn
29566b75c14f867bd7e8fc19c236e9be4f9f5203
[ "Apache-2.0" ]
2
2020-05-03T09:13:55.000Z
2020-09-23T11:58:01.000Z
usa_elections([('m', 13), ('o', 76), ('m', 54), ('m', 7)]) usa_elections2([('m', 13), ('o', 76), ('m', 54), ('m', 7)]) usa_elections3([('m', 13), ('o', 76), ('m', 54), ('m', 7)])
31.241379
118
0.611479
def usa_elections(state_elections): elections_result = {} for n, m in state_elections: if n in elections_result.keys(): tmp = elections_result.pop(n) + m elections_result[n] = tmp else: elections_result[n] = m print(sorted(elections_result.items())) def ...
0
0
0
0
0
655
0
0
68
adfd001a37f08cd2177c0d1fcf39aab27442e81b
13,073
py
Python
venv/dbManage.py
180Studios/LoginApp
66ff684a81b23d8f45eef2c56be19a2afd95ab29
[ "MIT" ]
null
null
null
venv/dbManage.py
180Studios/LoginApp
66ff684a81b23d8f45eef2c56be19a2afd95ab29
[ "MIT" ]
5
2021-03-18T22:28:19.000Z
2022-03-11T23:41:33.000Z
venv/dbManage.py
180Studios/LoginApp
66ff684a81b23d8f45eef2c56be19a2afd95ab29
[ "MIT" ]
1
2020-02-02T21:17:12.000Z
2020-02-02T21:17:12.000Z
""" Current Limitations: - A member cannot transition from a monthly to a punchcard without losing the remainder of their time """ from datetime import time
44.315254
127
0.591907
""" Current Limitations: - A member cannot transition from a monthly to a punchcard without losing the remainder of their time """ import sys import pprint import hashlib from datetime import datetime, date, time, timedelta import time from tinydb import * from tinydb.operations import decrement import re im...
0
0
0
12,650
0
35
0
-12
224
26e8614db3b2844907e182a2734e56f546e2ce1a
4,159
py
Python
prep_mortality.py
birdx0810/mimic3-benchmarks
6a663966ebe1355856380c144fb4f8a2e88d42b4
[ "MIT" ]
null
null
null
prep_mortality.py
birdx0810/mimic3-benchmarks
6a663966ebe1355856380c144fb4f8a2e88d42b4
[ "MIT" ]
null
null
null
prep_mortality.py
birdx0810/mimic3-benchmarks
6a663966ebe1355856380c144fb4f8a2e88d42b4
[ "MIT" ]
1
2021-04-10T02:30:17.000Z
2021-04-10T02:30:17.000Z
HEADERS = [ "Index", "Hours", "Capillary refill rate", "Diastolic blood pressure", "Fraction inspired oxygen", "Glascow coma scale eye opening", "Glascow coma scale motor response", "Glascow coma scale total", "Glascow coma scale verbal response", "Glucose", "Heart Rate", "Height", "Mean blood pr...
30.580882
78
0.632364
import pandas as pd import numpy as np from mimic3benchmark.readers import InHospitalMortalityReader HEADERS = [ "Index", "Hours", "Capillary refill rate", "Diastolic blood pressure", "Fraction inspired oxygen", "Glascow coma scale eye opening", "Glascow coma scale motor response", "Glascow coma scale to...
0
0
0
0
0
2,466
0
35
113
e26997be0b1d31819e7518b45db3823185c85186
898
py
Python
weight/users/models/users.py
aleducode/lose_weightapp
1210cf3104c0fc929509ff6e51337dbd2dfa157e
[ "MIT" ]
3
2019-08-21T06:18:57.000Z
2019-11-04T03:00:43.000Z
weight/users/models/users.py
alejandroduquec/lose_weightapp
1210cf3104c0fc929509ff6e51337dbd2dfa157e
[ "MIT" ]
11
2019-12-20T17:17:27.000Z
2022-03-12T00:09:01.000Z
weight/users/models/users.py
SeptumDevs/lose_weightapp
2c39ba45aa6aef37820b385c3060c83a73f8f910
[ "MIT" ]
2
2019-08-07T14:56:57.000Z
2019-09-03T00:13:31.000Z
"""User model.""" # Django # Utils
21.902439
72
0.624722
"""User model.""" # Django from django.db import models from django.contrib.auth.models import AbstractUser # Utils from weight.utils.models import WeightModel class User(WeightModel, AbstractUser): """User model. Extend from Django abstract user, change the username field to email and add some extra i...
0
0
0
713
0
0
0
59
89
be0af01b6d78a607e74bf0afc9f7a32a735e57c1
2,005
py
Python
kanon_api/routes/calculations.py
legau/kanon-api
bae8fcba11caefa2f6715247852f853bb52fb9a6
[ "BSD-3-Clause" ]
null
null
null
kanon_api/routes/calculations.py
legau/kanon-api
bae8fcba11caefa2f6715247852f853bb52fb9a6
[ "BSD-3-Clause" ]
80
2021-04-21T16:02:03.000Z
2022-03-28T00:48:58.000Z
kanon_api/routes/calculations.py
legau/kanon-api
bae8fcba11caefa2f6715247852f853bb52fb9a6
[ "BSD-3-Clause" ]
null
null
null
from fastapi.routing import APIRouter router = APIRouter(prefix="/calculations", tags=["calculations"]) op_to_token = { Operation.add: "+", Operation.sub: "-", Operation.mul: "*", Operation.div: "/", }
24.156627
83
0.660349
from enum import Enum from typing import Type from fastapi.param_functions import Depends, Path, Query from fastapi.routing import APIRouter, HTTPException from kanon.units.radices import BasedReal, IllegalBaseValueError from kanon_api.core.calculations.parser import parse from kanon_api.utils import safe_radix rout...
0
1,202
0
70
0
91
0
143
272
1897b6c6f7cb0200731ca062c3689139850dcb45
618
py
Python
1094.py
barroslipe/urionlinejudge
a20d8199d9a92b30ea394a6c949967d2fc51aa34
[ "MIT" ]
null
null
null
1094.py
barroslipe/urionlinejudge
a20d8199d9a92b30ea394a6c949967d2fc51aa34
[ "MIT" ]
null
null
null
1094.py
barroslipe/urionlinejudge
a20d8199d9a92b30ea394a6c949967d2fc51aa34
[ "MIT" ]
null
null
null
n = int(input()) coelhos = 0 ratos = 0 sapos = 0 for i in range(n): quantia, tipo = input().split() quantia = int(quantia) if tipo == 'C': coelhos += quantia elif tipo == 'R': ratos += quantia else: sapos += quantia total = coelhos + ratos + sapos print(f"Total: {total}...
22.888889
62
0.60356
n = int(input()) coelhos = 0 ratos = 0 sapos = 0 for i in range(n): quantia, tipo = input().split() quantia = int(quantia) if tipo == 'C': coelhos += quantia elif tipo == 'R': ratos += quantia else: sapos += quantia total = coelhos + ratos + sapos print(f"Total: {total}...
0
0
0
0
0
0
0
0
0
fc6615f6c5f14d121de15edf5c6ef89c8391483c
1,537
py
Python
tests/schema/github/mutation/test_authenticate_with_git_hub.py
simonsobs/acondbs
6ca11c2889d827ecdb2b54d0cf3b94b8cdd281e6
[ "MIT" ]
null
null
null
tests/schema/github/mutation/test_authenticate_with_git_hub.py
simonsobs/acondbs
6ca11c2889d827ecdb2b54d0cf3b94b8cdd281e6
[ "MIT" ]
24
2020-04-02T19:29:07.000Z
2022-03-08T03:05:43.000Z
tests/schema/github/mutation/test_authenticate_with_git_hub.py
simonsobs/acondbs
6ca11c2889d827ecdb2b54d0cf3b94b8cdd281e6
[ "MIT" ]
1
2020-04-08T15:48:28.000Z
2020-04-08T15:48:28.000Z
import unittest.mock as mock ##__________________________________________________________________|| ##__________________________________________________________________|| ##__________________________________________________________________||
26.964912
84
0.681848
import textwrap from async_asgi_testclient import TestClient from a2wsgi import WSGIMiddleware import pytest import unittest.mock as mock ##__________________________________________________________________|| @pytest.fixture(autouse=True) def mock_authenticate(monkeypatch): y = mock.Mock() monkeypatch.setat...
0
1,134
0
0
0
0
0
21
134
18b4f7bb7688e6906cb778fe2aa8673bcb717cb7
5,069
py
Python
receiveSTA/rcv_phase_queen.py
ilinastoilkovska/syncTA
9224ef50d5ada4782d0a1d5723531ebe43149584
[ "Apache-2.0" ]
2
2021-01-05T11:45:48.000Z
2021-04-06T12:59:38.000Z
receiveSTA/rcv_phase_queen.py
ilinastoilkovska/syncTA
9224ef50d5ada4782d0a1d5723531ebe43149584
[ "Apache-2.0" ]
null
null
null
receiveSTA/rcv_phase_queen.py
ilinastoilkovska/syncTA
9224ef50d5ada4782d0a1d5723531ebe43149584
[ "Apache-2.0" ]
null
null
null
# process local states local = range(24) # L states L = {"x0" : [0, 12], "x1" : [1, 13], "q0" : [14], "q1" : [15], "qb" : [20]} # receive variables rcv_vars = ["nr0", "nr1", "nrq0", "nrq1"] # initial states initial = [0, 1, 12, 13, 18, 19] # rules rules = [] rules.append({'idx': 0, 'from': 0, 'to': 2, 'guard': "(and ...
44.464912
138
0.537779
# process local states local = range(24) # L states L = {"x0" : [0, 12], "x1" : [1, 13], "q0" : [14], "q1" : [15], "qb" : [20]} # receive variables rcv_vars = ["nr0", "nr1", "nrq0", "nrq1"] # initial states initial = [0, 1, 12, 13, 18, 19] # rules rules = [] rules.append({'idx': 0, 'from': 0, 'to': 2, 'guard': "(and ...
0
0
0
0
0
0
0
0
0
df48654b3889729ab922bcad9596bebdf57a3625
1,012
py
Python
source/pkgsrc/lang/python27/patches/patch-Lib_ctypes_macholib_dyld.py
Scottx86-64/dotfiles-1
51004b1e2b032664cce6b553d2052757c286087d
[ "Unlicense" ]
1
2021-11-20T22:46:39.000Z
2021-11-20T22:46:39.000Z
source/pkgsrc/lang/python27/patches/patch-Lib_ctypes_macholib_dyld.py
Scottx86-64/dotfiles-1
51004b1e2b032664cce6b553d2052757c286087d
[ "Unlicense" ]
null
null
null
source/pkgsrc/lang/python27/patches/patch-Lib_ctypes_macholib_dyld.py
Scottx86-64/dotfiles-1
51004b1e2b032664cce6b553d2052757c286087d
[ "Unlicense" ]
null
null
null
$NetBSD: patch-Lib_ctypes_macholib_dyld.py,v 1.1 2021/06/23 18:30:24 schmonz Exp $ darwin20 support, via MacPorts. --- Lib/ctypes/macholib/dyld.py.orig 2021-06-22 19:20:28.000000000 +0000 +++ Lib/ctypes/macholib/dyld.py @@ -7,6 +7,12 @@ from framework import framework_info from dylib import dylib_info +try: + f...
30.666667
82
0.666996
$NetBSD: patch-Lib_ctypes_macholib_dyld.py,v 1.1 2021/06/23 18:30:24 schmonz Exp $ darwin20 support, via MacPorts. --- Lib/ctypes/macholib/dyld.py.orig 2021-06-22 19:20:28.000000000 +0000 +++ Lib/ctypes/macholib/dyld.py @@ -7,6 +7,12 @@ from framework import framework_info from dylib import dylib_info from itertool...
0
0
0
0
0
34
0
2
48
5d0e430154d171e0eabbe5f9558a448abe2f626e
3,191
py
Python
discord/ext/commands/inject.py
aio-org/aio
3a990f8eb89a115c8832f95376e71b7c129d9b26
[ "MIT" ]
12
2021-11-11T14:10:31.000Z
2022-03-16T03:08:16.000Z
discord/ext/commands/inject.py
aio-org/aio
3a990f8eb89a115c8832f95376e71b7c129d9b26
[ "MIT" ]
24
2021-12-27T04:03:20.000Z
2022-01-26T10:24:51.000Z
discord/ext/commands/inject.py
aio-org/aio
3a990f8eb89a115c8832f95376e71b7c129d9b26
[ "MIT" ]
13
2021-11-12T09:06:11.000Z
2022-03-12T13:42:47.000Z
# -*- coding: utf-8 -*- # cython: language_level=3 # Copyright (c) 2021-present VincentRPS # 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 t...
31.91
100
0.643372
# -*- coding: utf-8 -*- # cython: language_level=3 # Copyright (c) 2021-present VincentRPS # 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 t...
0
0
619
1,259
0
0
0
11
92
6fae41d336f9d6f6d8c4520db3d57a993129fcc9
319
py
Python
flask_app.py
filchyboy/minimal_flask_application_with_templates
60dd8a919079a5ff6f1d4a8495ba49ce4653f09e
[ "MIT" ]
null
null
null
flask_app.py
filchyboy/minimal_flask_application_with_templates
60dd8a919079a5ff6f1d4a8495ba49ce4653f09e
[ "MIT" ]
null
null
null
flask_app.py
filchyboy/minimal_flask_application_with_templates
60dd8a919079a5ff6f1d4a8495ba49ce4653f09e
[ "MIT" ]
null
null
null
# flask_app.py - a minimal flsk application # import flask module from flask import Flask # initiate application app = Flask(__name__) # define route
19.9375
55
0.752351
# flask_app.py - a minimal flsk application # import flask module from flask import Flask, render_template # initiate application app = Flask(__name__) # define route @app.route("/") # attach a function to that route using render_template # from the flask module def root(): return render_template("home.html")
0
126
0
0
0
0
0
17
22
184b6e18c7619d5d8cdf1909db71b36517c8fdc2
571
py
Python
benchmark/tb_linear_chain.py
guruofquality/gras
a93956bfc9884f9a1c53a16e12cd7e7cd86584c4
[ "BSL-1.0" ]
9
2015-07-24T15:10:14.000Z
2021-11-08T13:18:20.000Z
benchmark/tb_linear_chain.py
guruofquality/gras
a93956bfc9884f9a1c53a16e12cd7e7cd86584c4
[ "BSL-1.0" ]
3
2015-02-02T01:57:26.000Z
2018-07-20T04:52:09.000Z
benchmark/tb_linear_chain.py
guruofquality/gras
a93956bfc9884f9a1c53a16e12cd7e7cd86584c4
[ "BSL-1.0" ]
4
2015-01-12T23:12:49.000Z
2021-09-23T18:10:58.000Z
import gnuradio from gnuradio import gr from gnuradio import blocks as grblocks import sys if __name__ == '__main__': duration = float(sys.argv[1]) tb = gr.top_block() src = gr.null_source(8) b0 = gr.copy(8) b1 = grblocks.sub_cc() b2 = gr.copy(8) b3 = grblocks.divide_cc() b4 = gr.copy...
20.392857
52
0.619965
import gnuradio from gnuradio import gr from gnuradio import blocks as grblocks import sys if __name__ == '__main__': duration = float(sys.argv[1]) tb = gr.top_block() src = gr.null_source(8) b0 = gr.copy(8) b1 = grblocks.sub_cc() b2 = gr.copy(8) b3 = grblocks.divide_cc() b4 = gr.copy...
0
0
0
0
0
0
0
0
0
4c0a77098527709a5f1e338dc49d1a2099b3bab5
436
py
Python
itez/beneficiary/migrations/0009_auto_20211105_1231.py
sonlinux/itez
0982c19763207e211e06b4e50a5a955f3de1693e
[ "MIT" ]
null
null
null
itez/beneficiary/migrations/0009_auto_20211105_1231.py
sonlinux/itez
0982c19763207e211e06b4e50a5a955f3de1693e
[ "MIT" ]
null
null
null
itez/beneficiary/migrations/0009_auto_20211105_1231.py
sonlinux/itez
0982c19763207e211e06b4e50a5a955f3de1693e
[ "MIT" ]
null
null
null
# Generated by Django 3.1.13 on 2021-11-05 12:31
22.947368
95
0.619266
# Generated by Django 3.1.13 on 2021-11-05 12:31 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('beneficiary', '0008_agentdetail'), ] operations = [ migrations.AlterField( model_name='agentdetail', name='agend_ID...
0
0
0
321
0
0
0
19
46
cc6eee492f020d5c04011b6db5794e7cb7b2dc9a
1,970
py
Python
configs/lemon-modules/config/config/modules/weather/weather.py
tiborsimon/dotfiles-osx
35bbc9a25419229ee607b2f79ec72c2b827be53a
[ "MIT" ]
6
2016-05-11T07:35:25.000Z
2019-06-10T09:29:16.000Z
configs/lemon-modules/config/config/modules/weather/weather.py
tiborsimon/dotfiles-osx
35bbc9a25419229ee607b2f79ec72c2b827be53a
[ "MIT" ]
null
null
null
configs/lemon-modules/config/config/modules/weather/weather.py
tiborsimon/dotfiles-osx
35bbc9a25419229ee607b2f79ec72c2b827be53a
[ "MIT" ]
1
2020-01-22T10:10:06.000Z
2020-01-22T10:10:06.000Z
import os import sys ICONS = { "01d": "", # clear sky "02d": "", # few clouds "03d": "", # scattered clouds "04d": "", # broken clouds "09d": "", # shower rain "10d": "", # rain "11d": "", # thunderstorm "13d": "", # snow "50d": "", # mist "01n": "", # clear sky "0...
22.906977
70
0.556345
import os import sys import time from datetime import datetime import requests ICONS = { "01d": "", # clear sky "02d": "", # few clouds "03d": "", # scattered clouds "04d": "", # broken clouds "09d": "", # shower rain "10d": "", # rain "11d": "", # thunderstorm "13d": ""...
73
0
0
0
0
792
0
-8
113
f8206078ea13634f1bdd0b1944a1691a8e75173e
2,506
py
Python
step4/AlexNetCompleted.py
Lintianqianjin/reappearance-of-some-classical-CNNs
f7f7556b581066f49ea4edb2db6c8f886c189c82
[ "Apache-2.0" ]
6
2019-07-02T07:25:14.000Z
2021-05-15T06:49:18.000Z
step4/AlexNetCompleted.py
Lintianqianjin/reappearance-of-some-classical-CNNs
f7f7556b581066f49ea4edb2db6c8f886c189c82
[ "Apache-2.0" ]
null
null
null
step4/AlexNetCompleted.py
Lintianqianjin/reappearance-of-some-classical-CNNs
f7f7556b581066f49ea4edb2db6c8f886c189c82
[ "Apache-2.0" ]
null
null
null
import tensorflow as tf # os.environ["TF_CPP_MIN_LOG_LEVEL"]='3' #---- begin----# # placeholder keeProb = tf.placeholder(tf.float32, shape=()) batchImgInput = tf.placeholder(tf.float32, shape=(None, 224, 224, 3)) labels = tf.placeholder(tf.float32, shape=(None, 4)) # ++ conv1 = tf.layers.Conv2D(filters=96, kernel_s...
36.852941
115
0.715483
import tensorflow as tf import os # os.environ["TF_CPP_MIN_LOG_LEVEL"]='3' #----以下是答案部分 begin----# # 定义placeholder 开始 keeProb = tf.placeholder(tf.float32, shape=()) batchImgInput = tf.placeholder(tf.float32, shape=(None, 224, 224, 3)) labels = tf.placeholder(tf.float32, shape=(None, 4)) # 第一层卷积+归一化+池化 开始 conv1 = tf.l...
660
0
0
0
0
0
0
-12
22
72addc3d77cd51c58c7cbe4624841c6fe3dfe60e
37,926
py
Python
pysnmp/Juniper-ACCOUNTING-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
11
2021-02-02T16:27:16.000Z
2021-08-31T06:22:49.000Z
pysnmp/Juniper-ACCOUNTING-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
75
2021-02-24T17:30:31.000Z
2021-12-08T00:01:18.000Z
pysnmp/Juniper-ACCOUNTING-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
10
2019-04-30T05:51:36.000Z
2022-02-16T03:33:41.000Z
# # PySNMP MIB module Juniper-ACCOUNTING-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/Juniper-ACCOUNTING-MIB # Produced by pysmi-0.3.4 at Mon Apr 29 19:50:51 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (d...
149.905138
8,112
0.774587
# # PySNMP MIB module Juniper-ACCOUNTING-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/Juniper-ACCOUNTING-MIB # Produced by pysmi-0.3.4 at Mon Apr 29 19:50:51 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (d...
0
0
0
0
0
0
0
0
0
831fb8be89c2533fc255f20c58535db4f6957e7e
32,732
py
Python
hydra_python_core/doc_writer.py
king-11/hydra-python-core
3795cb0bd8eeb0f310febf17090ca3bdb1b1d135
[ "MIT" ]
null
null
null
hydra_python_core/doc_writer.py
king-11/hydra-python-core
3795cb0bd8eeb0f310febf17090ca3bdb1b1d135
[ "MIT" ]
null
null
null
hydra_python_core/doc_writer.py
king-11/hydra-python-core
3795cb0bd8eeb0f310febf17090ca3bdb1b1d135
[ "MIT" ]
null
null
null
"""API Doc templates generator."""
38.781991
118
0.528901
"""API Doc templates generator.""" from typing import Any, Dict, List, Optional, Union from urllib.parse import quote, urljoin class HydraDoc: """Class for an API Doc.""" def __init__(self, API: str, title: str, desc: str, entrypoint: str, base_url: str, doc_name: str) -> None: """In...
0
0
0
32,197
0
0
0
48
435
c959fa1876b26e72056c0237c0b65d604f5ebd0c
4,962
py
Python
grafana_script/opennms_functions.py
pkremser/cmdbToGrafana
056e872a26c3578562546aa94a7d71bd6e78d7a2
[ "MIT" ]
1
2018-09-21T12:29:00.000Z
2018-09-21T12:29:00.000Z
grafana_script/opennms_functions.py
pkremser/cmdbToGrafana
056e872a26c3578562546aa94a7d71bd6e78d7a2
[ "MIT" ]
null
null
null
grafana_script/opennms_functions.py
pkremser/cmdbToGrafana
056e872a26c3578562546aa94a7d71bd6e78d7a2
[ "MIT" ]
null
null
null
""" Grafana-Script functions module This is the functions module of Grafana-Script :license: MIT, see LICENSE for more details :copyright: (c) 2020 by NETHINKS GmbH, see AUTHORS for more details """ from grafana_script.config import ScriptConfig CONF = ScriptConfig()
44.303571
142
0.621322
""" Grafana-Script functions module This is the functions module of Grafana-Script :license: MIT, see LICENSE for more details :copyright: (c) 2020 by NETHINKS GmbH, see AUTHORS for more details """ import xml.etree.ElementTree as ET import requests from grafana_script.config import ScriptConfig CONF = ScriptConfig()...
0
0
0
4,617
0
0
0
7
68
026a11d51959d6a84d26a17356e4207fda55e4b7
394
py
Python
maxibonkata/chat.py
nando/MaxibonKataPython
2754e3a2b52fac41752df70ab614e7a28a90811b
[ "Apache-2.0" ]
null
null
null
maxibonkata/chat.py
nando/MaxibonKataPython
2754e3a2b52fac41752df70ab614e7a28a90811b
[ "Apache-2.0" ]
null
null
null
maxibonkata/chat.py
nando/MaxibonKataPython
2754e3a2b52fac41752df70ab614e7a28a90811b
[ "Apache-2.0" ]
null
null
null
"""maxibonkata.chat This module contains the Chat class implementation. :copyright: 2019, Karumi & The Cocktail :license: Apache License. See LICENSE.txt file for further details. """
20.736842
67
0.690355
"""maxibonkata.chat This module contains the Chat class implementation. :copyright: 2019, Karumi & The Cocktail :license: Apache License. See LICENSE.txt file for further details. """ class Chat: def __init__( self ): self.messageSent = None def messageSent( self ): return self.messageSent ...
0
0
0
184
0
0
0
0
23
fd6fe915bf587870c4656cdcce6cd4b5cd6b6465
1,627
py
Python
tests/test_model.py
kartik4949/detectia
e62165372b2abac63239d540dfa8c3ee0eafd75c
[ "Apache-2.0" ]
3
2021-02-02T10:59:26.000Z
2021-11-20T07:56:29.000Z
tests/test_model.py
kartik4949/detectia
e62165372b2abac63239d540dfa8c3ee0eafd75c
[ "Apache-2.0" ]
null
null
null
tests/test_model.py
kartik4949/detectia
e62165372b2abac63239d540dfa8c3ee0eafd75c
[ "Apache-2.0" ]
null
null
null
# Copyright 2021 Kartik Sharma. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
33.204082
83
0.685925
# Copyright 2021 Kartik Sharma. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
0
605
0
0
0
0
0
19
90
eb30a14bc7368d14ee55eab684b7975c1c964890
7,971
py
Python
RoteamentoTCC/nsga/population.py
Luc4s99/Trabalho-de-Conclusao-de-Curso
028adb1ffe38601b0f227b3f1ef0731615af2f14
[ "MIT" ]
null
null
null
RoteamentoTCC/nsga/population.py
Luc4s99/Trabalho-de-Conclusao-de-Curso
028adb1ffe38601b0f227b3f1ef0731615af2f14
[ "MIT" ]
null
null
null
RoteamentoTCC/nsga/population.py
Luc4s99/Trabalho-de-Conclusao-de-Curso
028adb1ffe38601b0f227b3f1ef0731615af2f14
[ "MIT" ]
null
null
null
""" Este cdigo possui partes desenvolvidas ou baseadas em cdigo desenvolvido por Thales Otvio Link do GitHub: https://github.com/thalesorp/NSGA-II """
30.54023
105
0.611592
""" Este código possui partes desenvolvidas ou baseadas em código desenvolvido por Thales Otávio Link do GitHub: https://github.com/thalesorp/NSGA-II """ import sys import random from .individual import Individual class Population: """Class of population of indiviuals, used by NSGA-II""" def __init__(sel...
36
0
0
7,714
0
0
0
-6
91
8d5e55c8f7b610aaf289ad4c50b7ae54fc3bfc7f
4,261
py
Python
metafilter/rescan_folder.py
exhuma/metafilter
dfbc01877a3020f7fe58b9fda3e14ed073684f25
[ "BSD-3-Clause" ]
null
null
null
metafilter/rescan_folder.py
exhuma/metafilter
dfbc01877a3020f7fe58b9fda3e14ed073684f25
[ "BSD-3-Clause" ]
null
null
null
metafilter/rescan_folder.py
exhuma/metafilter
dfbc01877a3020f7fe58b9fda3e14ed073684f25
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/python from os.path import expanduser, dirname, exists from os import makedirs import logging import logging.handlers from config_resolver import Config LOG = logging.getLogger(__name__) LOG.setLevel(logging.DEBUG) FORMATTER = logging.Formatter("%(asctime)s - %(name)s - %(levelname)s - %(message)s") CONSO...
42.188119
272
0.681295
#!/usr/bin/python from os.path import expanduser, dirname, exists from os import makedirs import sys from datetime import datetime from optparse import OptionParser import logging import logging.handlers from config_resolver import Config LOG = logging.getLogger(__name__) LOG.setLevel(logging.DEBUG) FORMATTER = logg...
0
0
0
0
0
2,943
0
89
111
7ee947ca4dc0f1a2497ac3e702c394e0205b73ac
4,638
py
Python
PY_Debug_Investigations/PY27_UEE_UDE/script/event_v3.py
TheMitchWorksPro/DataTech_Playground
d62266d21762315f431fb4f707940095901b85e6
[ "MIT" ]
null
null
null
PY_Debug_Investigations/PY27_UEE_UDE/script/event_v3.py
TheMitchWorksPro/DataTech_Playground
d62266d21762315f431fb4f707940095901b85e6
[ "MIT" ]
null
null
null
PY_Debug_Investigations/PY27_UEE_UDE/script/event_v3.py
TheMitchWorksPro/DataTech_Playground
d62266d21762315f431fb4f707940095901b85e6
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # Draft Version ... presented to illustrate how the problem shifts and how later solutions address this # * In this version, several solutions from Stack Overflow are added into the code. # * the result is that one encode error is solved but another one shifts to a d...
44.596154
122
0.59379
#!/usr/bin/env python # -*- coding: utf-8 -*- # Draft Version ... presented to illustrate how the problem shifts and how later solutions address this # * In this version, several solutions from Stack Overflow are added into the code. # * the result is that one encode error is solved but another one shifts to a d...
0
0
0
1,056
0
2,035
0
-6
72
851d39d178b6d5c7322e6b780351297f5faed31a
4,063
py
Python
agents/dqn/q7.py
caoxuwen/bitgym
0a6796a039290122430ebc13c8d7ad9ff741921a
[ "MIT" ]
1
2018-09-07T10:10:29.000Z
2018-09-07T10:10:29.000Z
agents/dqn/q7.py
caoxuwen/bitgym
0a6796a039290122430ebc13c8d7ad9ff741921a
[ "MIT" ]
null
null
null
agents/dqn/q7.py
caoxuwen/bitgym
0a6796a039290122430ebc13c8d7ad9ff741921a
[ "MIT" ]
null
null
null
import tensorflow.contrib.layers as layers from q1_schedule import LinearExploration, LinearSchedule from configs.q7 import config import pandas as pd import trading_env """ Use a different architecture for the Atari game. Please report the final result. Feel free to change the configuration. If so, pl...
35.640351
105
0.603741
import gym import tensorflow as tf import tensorflow.contrib.layers as layers from utils.general import get_logger from q1_schedule import LinearExploration, LinearSchedule from q2_linear import Linear from configs.q7 import config import pandas as pd import trading_env class MyDQN(Linear): de...
0
0
0
2,612
0
0
0
13
146
7255ae01d8acdfeb355f9adff31646a370a340fa
329
py
Python
pybytecode/fibonacci.py
Risto-Stevcev/python-bytecode
67f4c56ff838b74e5f81cfd09b41d27c202c9ad2
[ "BSD-3-Clause" ]
19
2016-12-16T09:27:03.000Z
2022-01-26T11:54:11.000Z
pybytecode/fibonacci.py
Risto-Stevcev/python-bytecode
67f4c56ff838b74e5f81cfd09b41d27c202c9ad2
[ "BSD-3-Clause" ]
null
null
null
pybytecode/fibonacci.py
Risto-Stevcev/python-bytecode
67f4c56ff838b74e5f81cfd09b41d27c202c9ad2
[ "BSD-3-Clause" ]
3
2017-11-07T12:25:03.000Z
2022-02-04T02:00:19.000Z
import sys if __name__ == '__main__': if len(sys.argv) != 2: print('Usage: %s [length]' % sys.argv[0]) sys.exit(1) print( fibonacci( int(sys.argv[1]) ) )
19.352941
50
0.507599
import sys def fibonacci(n): if n == 0: return 0 elif n == 1: return 1 else: return fibonacci(n - 1) + fibonacci(n - 2) if __name__ == '__main__': if len(sys.argv) != 2: print('Usage: %s [length]' % sys.argv[0]) sys.exit(1) print( fibonacci( int(sys.argv...
0
0
0
0
0
126
0
0
23
9026187c921a854d6c5d36e2aa15c0a6ed78a5db
2,830
py
Python
tests/test_assistant.py
jun-harashima/paper
4fe211fd16f17cd3cfba7c55647d4e3306fa39b3
[ "MIT" ]
1
2018-03-09T03:44:24.000Z
2018-03-09T03:44:24.000Z
tests/test_assistant.py
jun-harashima/paper
4fe211fd16f17cd3cfba7c55647d4e3306fa39b3
[ "MIT" ]
24
2018-03-20T05:33:00.000Z
2018-04-27T02:04:53.000Z
tests/test_assistant.py
jun-harashima/pott
4fe211fd16f17cd3cfba7c55647d4e3306fa39b3
[ "MIT" ]
2
2018-03-09T03:47:20.000Z
2018-03-21T09:03:54.000Z
import unittest if __name__ == "__main__": unittest.main()
41.014493
78
0.710954
import unittest from unittest.mock import patch from pott.option import Option from pott.paper import Paper from pott.yaml import Yaml from pott.assistants.assistant import Assistant from pott.assistants.global_assistant import GlobalAssistant from pott.assistants.local_assistant import LocalAssistant class TestAssis...
0
1,283
0
1,171
0
0
0
133
177
4837c22434df76c42e5dbcae0cac35c1519de4a9
13,287
py
Python
scripts/social_media.py
akosednar/congress-legislators
f36c1db486b5cecaa6e57bb0d6ac440997d3b58e
[ "CC0-1.0" ]
1
2019-06-09T23:46:31.000Z
2019-06-09T23:46:31.000Z
scripts/social_media.py
akosednar/congress-legislators
f36c1db486b5cecaa6e57bb0d6ac440997d3b58e
[ "CC0-1.0" ]
null
null
null
scripts/social_media.py
akosednar/congress-legislators
f36c1db486b5cecaa6e57bb0d6ac440997d3b58e
[ "CC0-1.0" ]
null
null
null
#!/usr/bin/env python # run with --sweep (or by default): # given a service, looks through current members for those missing an account on that service, # and checks that member's official website's source code for mentions of that service. # A CSV of "leads" is produced for manual review. # # run with --update:...
34.333333
141
0.600361
#!/usr/bin/env python # run with --sweep (or by default): # given a service, looks through current members for those missing an account on that service, # and checks that member's official website's source code for mentions of that service. # A CSV of "leads" is produced for manual review. # # run with --update:...
0
0
0
0
0
12,026
0
-5
112
5bcfe23d839533d6e7085bbaf860586fddc81725
8,277
py
Python
main.py
elg3a/signalbot
6bffaa7d1dff877784347b1287bd2e271af45a43
[ "MIT" ]
null
null
null
main.py
elg3a/signalbot
6bffaa7d1dff877784347b1287bd2e271af45a43
[ "MIT" ]
null
null
null
main.py
elg3a/signalbot
6bffaa7d1dff877784347b1287bd2e271af45a43
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # encoding:utf8 """An extensible, command based bot interface for the Signal Messenger. """ import json import logging import os from datetime import datetime, timedelta from mysignald import MySignal from pymongo import MongoClient workdir = os.getcwd() + "/" logging.basicConfig( format="...
32.715415
77
0.595264
#!/usr/bin/env python3 # encoding:utf8 """An extensible, command based bot interface for the Signal Messenger. """ import functools import json import logging import os import random import time import uuid import wikipedia from datetime import datetime, timedelta from mysignald import MySignal from pymongo import Mon...
0
5,699
0
0
0
415
0
-19
434
bb4912230759f477eb8c26dbee51d9a3770f3e0c
2,410
py
Python
assets/sender.py
smallkirby/lysithea
4e70fb15bee8bb4a5c83ba680fc4386c64edf730
[ "MIT" ]
11
2021-11-12T11:53:45.000Z
2022-03-28T03:40:54.000Z
assets/sender.py
smallkirby/lysithea
4e70fb15bee8bb4a5c83ba680fc4386c64edf730
[ "MIT" ]
9
2021-12-02T08:26:31.000Z
2021-12-12T05:34:40.000Z
assets/sender.py
smallkirby/lysithea
4e70fb15bee8bb4a5c83ba680fc4386c64edf730
[ "MIT" ]
null
null
null
#!/usr/bin/env python #encoding: utf-8; import sys hosts = ("","localhost","localhost") ports = (0,12300,23947) rhp1 = {'host':hosts[0],'port':ports[0]} #for actual server rhp2 = {'host':hosts[1],'port':ports[1]} #for localhost rhp3 = {'host':hosts[2],'port':ports[2]} #for localhost running on docker exploit...
26.777778
103
0.573444
#!/usr/bin/env python #encoding: utf-8; from pwn import * import sys,os hosts = ("","localhost","localhost") ports = (0,12300,23947) rhp1 = {'host':hosts[0],'port':ports[0]} #for actual server rhp2 = {'host':hosts[1],'port':ports[1]} #for localhost rhp3 = {'host':hosts[2],'port':ports[2]} #for localhost runn...
0
0
0
0
0
1,332
0
-1
69
3238a85ee5269e34b56d49d596c5d29cf3fdbaf9
7,093
py
Python
brb_topology/topology_brb.py
ashhadsheikh/ebpf_turtle
459c0571d299a34583285a2f3aebf217071b5e36
[ "Apache-2.0" ]
7
2016-01-02T11:52:07.000Z
2020-08-06T17:09:19.000Z
helpful_code/brb_topology/topology_brb.py
ZirakZaheer/ZeroTrust-Ebpf
b0f1968e5c9fa307a84b62a76f02847845a458db
[ "Apache-2.0" ]
null
null
null
helpful_code/brb_topology/topology_brb.py
ZirakZaheer/ZeroTrust-Ebpf
b0f1968e5c9fa307a84b62a76f02847845a458db
[ "Apache-2.0" ]
3
2016-06-19T20:41:45.000Z
2020-05-20T19:28:27.000Z
#!/usr/bin/env python # Copyright (c) PLUMgrid, Inc. # Licensed under the Apache License, Version 2.0 (the "License") from bcc import BPF from builtins import input from ctypes import c_uint, c_int, c_ulong from pyroute2 import IPRoute, IPDB, NSPopen from simulation import Simulation from netaddr import IPAddress impo...
44.610063
120
0.613563
#!/usr/bin/env python # Copyright (c) PLUMgrid, Inc. # Licensed under the Apache License, Version 2.0 (the "License") from bcc import BPF from builtins import input from ctypes import c_uint,c_int, c_ulong from pyroute2 import IPRoute, IPDB, NSPopen from simulation import Simulation from netaddr import IPAddress impor...
0
0
0
6,277
0
0
0
-1
23
c2cedd1e75611d95f872be5fe836a7b46ad9e7de
979
py
Python
justonecilck.py
caterpillar0111/automodeltrain
f393009c3975d4c8b0e9d33f8172669f0938a307
[ "Apache-2.0" ]
null
null
null
justonecilck.py
caterpillar0111/automodeltrain
f393009c3975d4c8b0e9d33f8172669f0938a307
[ "Apache-2.0" ]
null
null
null
justonecilck.py
caterpillar0111/automodeltrain
f393009c3975d4c8b0e9d33f8172669f0938a307
[ "Apache-2.0" ]
null
null
null
from sklearn.externals import joblib from sklearn.datasets import load_iris from sklearn.model_selection import train_test_split import os.path data = load_iris() Xtrain, Xtest, Ytrain, Ytest = train_test_split(data.data, data.target, test_size=0.3, random_state=4) # Save to file in the current worki...
33.758621
104
0.656793
from sklearn.externals import joblib from sklearn.linear_model import LogisticRegression from sklearn.datasets import load_iris from sklearn.model_selection import train_test_split import os.path import gzip import os data = load_iris() Xtrain, Xtest, Ytrain, Ytest = train_test_split(data.data, da...
0
0
0
0
0
0
0
8
71
e61936d2bab22caa1012de227dd18a344b8b8ef6
1,244
py
Python
control_nodes/src/cmd2thruster.py
EEEManchester/MallARD_Sim_2
961e1fbe2cf549953a6ce1d0b7a594f14d2fb6f9
[ "BSD-3-Clause" ]
null
null
null
control_nodes/src/cmd2thruster.py
EEEManchester/MallARD_Sim_2
961e1fbe2cf549953a6ce1d0b7a594f14d2fb6f9
[ "BSD-3-Clause" ]
null
null
null
control_nodes/src/cmd2thruster.py
EEEManchester/MallARD_Sim_2
961e1fbe2cf549953a6ce1d0b7a594f14d2fb6f9
[ "BSD-3-Clause" ]
1
2022-02-19T13:11:40.000Z
2022-02-19T13:11:40.000Z
#!/usr/bin/env python import rospy import numpy as np # build inverted matrix # A is control allocation matrix # 0.2075 and 0.2375 are moment arms measured from the centre of Mallard, i.e. half the distance between thrusters A = np.mat("1 1 0 0; 0 0 -1 -1; 0.2075 -0.2075 0.2375 -0.2375") # Calculate the Moore--Pe...
25.387755
113
0.676849
#!/usr/bin/env python import rospy import numpy as np from sensor_msgs.msg import Joy from geometry_msgs.msg import Twist from sensor_msgs.msg import JointState # build inverted matrix # A is control allocation matrix # 0.2075 and 0.2375 are moment arms measured from the centre of Mallard, i.e. half the distance b...
0
0
0
0
0
626
0
41
112
bc0b626283c19004a2566df5576f607ceae7ba5c
6,704
py
Python
pypy/module/_cffi_backend/wrapper.py
nanjekyejoannah/pypy
e80079fe13c29eda7b2a6b4cd4557051f975a2d9
[ "Apache-2.0", "OpenSSL" ]
333
2015-08-08T18:03:38.000Z
2022-03-22T18:13:12.000Z
pypy/module/_cffi_backend/wrapper.py
nanjekyejoannah/pypy
e80079fe13c29eda7b2a6b4cd4557051f975a2d9
[ "Apache-2.0", "OpenSSL" ]
7
2020-02-16T16:49:05.000Z
2021-11-26T09:00:56.000Z
pypy/module/_cffi_backend/wrapper.py
nanjekyejoannah/pypy
e80079fe13c29eda7b2a6b4cd4557051f975a2d9
[ "Apache-2.0", "OpenSSL" ]
55
2015-08-16T02:41:30.000Z
2022-03-20T20:33:35.000Z
from pypy.interpreter.typedef import TypeDef, interp_attrproperty from pypy.interpreter.typedef import GetSetProperty from pypy.interpreter.gateway import interp2app W_FunctionWrapper.typedef = TypeDef( '_cffi_backend.__FFIFunctionWrapper', __repr__ = interp2app(W_FunctionWrapper.descr_repr), ...
44.693333
96
0.643049
from pypy.interpreter.error import oefmt from pypy.interpreter.baseobjspace import W_Root from pypy.interpreter.typedef import TypeDef, interp_attrproperty from pypy.interpreter.typedef import GetSetProperty from pypy.interpreter.gateway import interp2app from rpython.rlib import jit from pypy.module._cffi_backend.cda...
0
1,294
0
4,052
0
0
0
333
267
318f8944fd083de1e65c7061f4f87a373ce28977
86
py
Python
labels/admin.py
label-quest/backend
ff2ae40abeee3d85c2379fea71056cb857c0197b
[ "MIT" ]
null
null
null
labels/admin.py
label-quest/backend
ff2ae40abeee3d85c2379fea71056cb857c0197b
[ "MIT" ]
11
2018-11-22T12:03:55.000Z
2019-01-24T13:30:38.000Z
labels/admin.py
label-quest/backend
ff2ae40abeee3d85c2379fea71056cb857c0197b
[ "MIT" ]
null
null
null
from django.contrib import admin from .models import Label admin.site.register(Label)
21.5
32
0.825581
from django.contrib import admin from .models import Label admin.site.register(Label)
0
0
0
0
0
0
0
0
0
a1901f2b1ead24aeea163aecfff5481d43d54a8a
7,014
py
Python
tni.py
MetroSTL/TitleVI-Analysis
33a22b9574aa9d383e84c198dd2c8090a6f8ed5f
[ "MIT" ]
null
null
null
tni.py
MetroSTL/TitleVI-Analysis
33a22b9574aa9d383e84c198dd2c8090a6f8ed5f
[ "MIT" ]
null
null
null
tni.py
MetroSTL/TitleVI-Analysis
33a22b9574aa9d383e84c198dd2c8090a6f8ed5f
[ "MIT" ]
1
2021-03-17T13:50:24.000Z
2021-03-17T13:50:24.000Z
# ! are the imports needed if they are defined in main? # ! are we using tni at all? EHHHH NOT REALLY # Compute Transit Need Index (TNI) based on the 2003 service standards for each census blockgroup. # Use the minority, income, age and car ownership data computed in prior functions as inputs, and # add a feature clas...
64.944444
244
0.754919
# ! are the imports needed if they are defined in main? import arcpy import os import shutil from helpers import * # ! are we using tni at all? EHHHH NOT REALLY # Compute Transit Need Index (TNI) based on the 2003 service standards for each census blockgroup. # Use the minority, income, age and car ownership data co...
0
0
0
0
0
6,554
0
-29
112
2c649497655dade83c9dbd44ab84dc35d96a400e
917
py
Python
dawg/mkiconv.py
selavy/studies
e17b91ffab193e46fec00cf2b8070dbf1f2c39e3
[ "MIT" ]
null
null
null
dawg/mkiconv.py
selavy/studies
e17b91ffab193e46fec00cf2b8070dbf1f2c39e3
[ "MIT" ]
null
null
null
dawg/mkiconv.py
selavy/studies
e17b91ffab193e46fec00cf2b8070dbf1f2c39e3
[ "MIT" ]
null
null
null
#!/usr/bin/env python N = 128 vals = [-1]*N for i in range(N): ch = chr(i) if 'A' <= ch <= 'Z': vals[i] = i - ord('A') elif 'a' <= ch <= 'z': vals[i] = i - ord('a') groupsz = 16 grps = [] grp = [] for v in vals: if len(grp) >= groupsz: grps.append(fmtgrp(grp)) grp = ...
17.301887
62
0.536532
#!/usr/bin/env python N = 128 vals = [-1]*N for i in range(N): ch = chr(i) if 'A' <= ch <= 'Z': vals[i] = i - ord('A') elif 'a' <= ch <= 'z': vals[i] = i - ord('a') def fmtgrp(grp): return [f"{g:2d}" for g in grp] groupsz = 16 grps = [] grp = [] for v in vals: if len(grp) >= gr...
0
0
0
0
0
31
0
0
23
6181de7c3fbf5c1fd462f71bade799193208229d
7,371
py
Python
tools/translate.py
philbudne/tmg
7c003d7928b729a9154aac4396efa7c2aa31c799
[ "BSD-2-Clause" ]
41
2019-11-01T07:02:17.000Z
2022-03-27T17:54:38.000Z
tools/translate.py
philbudne/tmg
7c003d7928b729a9154aac4396efa7c2aa31c799
[ "BSD-2-Clause" ]
1
2020-05-31T07:01:08.000Z
2020-06-01T09:24:05.000Z
tools/translate.py
philbudne/tmg
7c003d7928b729a9154aac4396efa7c2aa31c799
[ "BSD-2-Clause" ]
4
2019-12-08T23:07:20.000Z
2021-08-21T17:38:35.000Z
#!/usr/bin/env python3 ''' Translates Unix TMG driving table from PDP-11 assembly to C arrays. Assumptions: - string literals are single line - byte directive has two octal values ''' from sys import argv if __name__=='__main__': t = Translator() t.start() for s in file_statements(argv[1]): t....
32.471366
120
0.439696
#!/usr/bin/env python3 ''' Translates Unix TMG driving table from PDP-11 assembly to C arrays. Assumptions: - string literals are single line - byte directive has two octal values ''' from sys import argv def line_statements(line, cnt): line = line.lstrip() while line: if line and line[0]=='<': ...
0
183
0
5,534
1,240
0
0
0
69