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
b93aaaa098f5b0f5469045e2b958a621296c7782
5,253
py
Python
train_textcnn_keras.py
BobooFu/Intelligent_sentence
bd3a028128826a8d1dffdd2040445cc396d383e8
[ "MIT" ]
1
2021-06-04T10:56:57.000Z
2021-06-04T10:56:57.000Z
train_textcnn_keras.py
BobooFu/Intelligent_sentence
bd3a028128826a8d1dffdd2040445cc396d383e8
[ "MIT" ]
null
null
null
train_textcnn_keras.py
BobooFu/Intelligent_sentence
bd3a028128826a8d1dffdd2040445cc396d383e8
[ "MIT" ]
null
null
null
import numpy as np import pandas as pd from keras.models import Model from keras.layers import Dense, Embedding, Input, Dropout from keras.layers.merge import concatenate from keras.layers import Conv1D, BatchNormalization, Activation, GlobalMaxPooling1D #from keras.utils import multi_gpu_model from sklearn.metrics imp...
39.496241
105
0.678279
import numpy as np import pandas as pd from keras.models import Model from keras.layers import Dense, Embedding, Input, Dropout from keras.layers.merge import concatenate from keras.layers import Conv1D, BatchNormalization, Activation, GlobalMaxPooling1D #from keras.utils import multi_gpu_model from data_utils.evaluati...
450
0
0
0
0
0
0
14
22
d42be723efccbe75a36d209fc5c95e66663865f1
646
py
Python
Lib/Scripts/glyphs/anchors/center.py
gferreira/hTools2
a75a671b81a0f4ce5c82b2ad3e2f971ca3e3d98c
[ "BSD-3-Clause" ]
11
2015-01-06T15:43:56.000Z
2019-07-27T00:35:20.000Z
Lib/Scripts/glyphs/anchors/center.py
gferreira/hTools2
a75a671b81a0f4ce5c82b2ad3e2f971ca3e3d98c
[ "BSD-3-Clause" ]
2
2017-05-17T10:11:46.000Z
2018-11-21T21:43:43.000Z
Lib/Scripts/glyphs/anchors/center.py
gferreira/hTools2
a75a671b81a0f4ce5c82b2ad3e2f971ca3e3d98c
[ "BSD-3-Clause" ]
4
2015-01-10T13:58:50.000Z
2019-12-18T15:40:14.000Z
# [h] center anchors from hTools2.modules.fontutils import get_glyphs from hTools2.modules.messages import no_font_open, no_glyph_selected anchor_names = ['top', 'bottom'] f = CurrentFont() if f is not None: glyph_names = get_glyphs(f) for glyph_name in glyph_names: glyph = f[glyph_name] a...
23.925926
68
0.622291
# [h] center anchors from hTools2.modules.fontutils import get_glyphs from hTools2.modules.messages import no_font_open, no_glyph_selected anchor_names = ['top', 'bottom'] f = CurrentFont() if f is not None: glyph_names = get_glyphs(f) for glyph_name in glyph_names: glyph = f[glyph_name] a...
0
0
0
0
0
0
0
0
0
4bf0d2cc2591bd38c36fab5a980f0b903b9a4811
361
py
Python
tests/conftest.py
arceo-labs/python-webdrivers
74905dac5e32f067321c946b1419c066bfbe1f2f
[ "MIT" ]
null
null
null
tests/conftest.py
arceo-labs/python-webdrivers
74905dac5e32f067321c946b1419c066bfbe1f2f
[ "MIT" ]
1
2021-03-31T19:13:28.000Z
2021-03-31T19:13:28.000Z
tests/conftest.py
arceo-labs/python-webdrivers
74905dac5e32f067321c946b1419c066bfbe1f2f
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import platform PLATFORM = platform.system().lower()
21.235294
61
0.753463
# -*- coding: utf-8 -*- import platform import shutil import tempfile import pytest PLATFORM = platform.system().lower() @pytest.fixture(scope="function", autouse=True) def local_install_dir(monkeypatch): install_dir = tempfile.mkdtemp() monkeypatch.setenv("WEBDRIVERS_INSTALL_DIR", install_dir) yield in...
0
214
0
0
0
0
0
-22
90
d255e565f981f12f80d5462ccba90000f2a3979d
4,841
py
Python
Model/EfficientConvLSTMUnit.py
DawoodChanti/Deep-Learning-for-Spatio-Temporal-Modeling-of-Dynamic-Spontaneous-Emotions
d9f6cd491a960111fc030018a8dd7c2e0cb92c25
[ "MIT" ]
1
2021-07-01T09:52:22.000Z
2021-07-01T09:52:22.000Z
Model/EfficientConvLSTMUnit.py
DawoodChanti/Deep-Learning-for-Spatio-Temporal-Modeling-of-Dynamic-Spontaneous-Emotions
d9f6cd491a960111fc030018a8dd7c2e0cb92c25
[ "MIT" ]
null
null
null
Model/EfficientConvLSTMUnit.py
DawoodChanti/Deep-Learning-for-Spatio-Temporal-Modeling-of-Dynamic-Spontaneous-Emotions
d9f6cd491a960111fc030018a8dd7c2e0cb92c25
[ "MIT" ]
null
null
null
# coding: utf-8 # ### Convolutional LSTM implementation with peephole connections __author__='Dawood Al Chanti' # In[1]: import tensorflow as tf # In[ ]: #tf.zeros_initializer: initilize with normal distribution instead of zero states def init_state(inputs, state_shape, state_initial...
36.126866
127
0.536253
# coding: utf-8 # ### Convolutional LSTM implementation with peephole connections __author__='Dawood Al Chanti' # In[1]: import tensorflow as tf from tensorflow.contrib.slim import add_arg_scope from tensorflow.contrib.slim import layers from tensorflow.contrib.layers.python.layers import initializers # In[ ]: #t...
0
3,289
0
0
0
96
0
92
112
ecae68eb35268e828b0d08620dd784f5b9ebd8df
668
py
Python
SCIPP_CSV_Parse.py
QuinnPaddock/SCIPP-Code
faa897e55b4edd676aff1103636071766f0b1140
[ "MIT" ]
null
null
null
SCIPP_CSV_Parse.py
QuinnPaddock/SCIPP-Code
faa897e55b4edd676aff1103636071766f0b1140
[ "MIT" ]
null
null
null
SCIPP_CSV_Parse.py
QuinnPaddock/SCIPP-Code
faa897e55b4edd676aff1103636071766f0b1140
[ "MIT" ]
null
null
null
import csv #need to extract the fields "EPC" and "Local Name" from the csv file "module frames 23june2021.csv" filename = 'module frames 23june2021.csv' #this will need to be changed based on what the file is called on whatever computer with open(filename, 'r', newline='') as csv_file: reader =...
23.034483
126
0.652695
import csv #need to extract the fields "EPC" and "Local Name" from the csv file "module frames 23june2021.csv" filename = 'module frames 23june2021.csv' #this will need to be changed based on what the file is called on whatever computer with open(filename, 'r', newline='') as csv_file: reader =...
0
0
0
0
0
0
0
0
0
3f08d4276e526b1e7213056a78a393f79d3c0643
7,280
py
Python
bock/search.py
afreeorange/bock
492a6fdd289831a4035c5245c89d91bbca3b4b90
[ "RSA-MD" ]
14
2017-02-20T18:57:09.000Z
2022-01-23T00:39:19.000Z
bock/search.py
afreeorange/bock
492a6fdd289831a4035c5245c89d91bbca3b4b90
[ "RSA-MD" ]
15
2016-12-19T18:29:01.000Z
2022-02-26T02:50:33.000Z
bock/search.py
afreeorange/bock
492a6fdd289831a4035c5245c89d91bbca3b4b90
[ "RSA-MD" ]
2
2016-08-18T03:49:16.000Z
2018-01-12T06:28:55.000Z
""" Set up a simple Whoosh index and provide a few simple methods to update and search it. To try at a REPL or from another module. Here's some copypasta for, say, an iPython session: article_root = "/Users/nikhilanand/Dropbox/wiki.nikhil.io.articles" search_index = create_search_index(article_root) updat...
29.003984
83
0.633104
""" Set up a simple Whoosh index and provide a few simple methods to update and search it. To try at a REPL or from another module. Here's some copypasta for, say, an iPython session: article_root = "/Users/nikhilanand/Dropbox/wiki.nikhil.io.articles" search_index = create_search_index(article_root) updat...
0
0
0
0
0
5,288
0
179
273
2a1134999ab69ba158e413ca15ef36f4938aeca2
5,848
py
Python
create_db.py
aernesto/Data_IO_Clicks_Project
2683d11cfa96793d036aa5c1597fb1e0d7b60506
[ "MIT" ]
null
null
null
create_db.py
aernesto/Data_IO_Clicks_Project
2683d11cfa96793d036aa5c1597fb1e0d7b60506
[ "MIT" ]
null
null
null
create_db.py
aernesto/Data_IO_Clicks_Project
2683d11cfa96793d036aa5c1597fb1e0d7b60506
[ "MIT" ]
null
null
null
""" The aim of this script is to create a database in hdf5 format """ # import copy import time import sys def create_hfd5_data_structure(hdf5file, groupname, num_trials, num_samples, max_trials=1000000): """ :param hdf5file: h5py.File :param groupname: :param num_trials: nb of trials :param max_...
34.60355
118
0.623119
""" The aim of this script is to create a database in hdf5 format """ # import copy import time import sys from official_fcns import * def create_hfd5_data_structure(hdf5file, groupname, num_trials, num_samples, max_trials=1000000): """ :param hdf5file: h5py.File :param groupname: :param num_trials: ...
0
0
0
0
0
395
0
6
45
782a22871f07cde995cf1bc2f68b2f643fa1d217
1,735
py
Python
tbx/services/migrations/0015_auto_20190207_1625.py
arush15june/wagtail-torchbox
c4d06e096c72bd8007975dc016133024f9d27fab
[ "MIT" ]
null
null
null
tbx/services/migrations/0015_auto_20190207_1625.py
arush15june/wagtail-torchbox
c4d06e096c72bd8007975dc016133024f9d27fab
[ "MIT" ]
null
null
null
tbx/services/migrations/0015_auto_20190207_1625.py
arush15june/wagtail-torchbox
c4d06e096c72bd8007975dc016133024f9d27fab
[ "MIT" ]
null
null
null
# Generated by Django 2.1.5 on 2019-02-07 16:25
36.914894
156
0.599424
# Generated by Django 2.1.5 on 2019-02-07 16:25 from django.db import migrations, models import django.db.models.deletion import modelcluster.fields class Migration(migrations.Migration): dependencies = [ ('wagtailcore', '0041_group_collection_permissions_verbose_name_plural'), ('services', '001...
0
0
0
1,561
0
0
0
35
90
e450b33ce98ad68f6800130c1efa749017e347ac
92
py
Python
example/test/T6_zuoye.py
Michael8968/skulpt
15956a60398fac92ee1dab25bf661ffc003b2eaf
[ "MIT" ]
2
2021-12-18T06:34:26.000Z
2022-01-05T05:08:47.000Z
example/test/T6_zuoye.py
Michael8968/skulpt
15956a60398fac92ee1dab25bf661ffc003b2eaf
[ "MIT" ]
null
null
null
example/test/T6_zuoye.py
Michael8968/skulpt
15956a60398fac92ee1dab25bf661ffc003b2eaf
[ "MIT" ]
null
null
null
import turtle for i in range(6): turtle.forward(100) turtle.right(60) turtle.done()
15.333333
23
0.684783
import turtle for i in range(6): turtle.forward(100) turtle.right(60) turtle.done()
0
0
0
0
0
0
0
0
0
0e1ec541ba1d0357739228f125a3dd064f30947a
1,585
py
Python
epitope_count_comparison.py
pdxgx/neoepiscope-paper
8e5187abe7764fdd3f94086d72e13082c4f0818f
[ "MIT" ]
1
2020-03-16T01:29:46.000Z
2020-03-16T01:29:46.000Z
epitope_count_comparison.py
pdxgx/neoepiscope-paper
8e5187abe7764fdd3f94086d72e13082c4f0818f
[ "MIT" ]
null
null
null
epitope_count_comparison.py
pdxgx/neoepiscope-paper
8e5187abe7764fdd3f94086d72e13082c4f0818f
[ "MIT" ]
null
null
null
#!/usr/bin/env python import os import glob import argparse # Set up command line arguments parser = argparse.ArgumentParser() parser.add_argument('-e', '--epitope_dir', type=str, required=True, help='path to directory containing neoepiscope results' ) parser.add_argument('-o', '--output_dir', type=str, req...
33.723404
145
0.691483
#!/usr/bin/env python import os import glob import argparse # Set up command line arguments parser = argparse.ArgumentParser() parser.add_argument('-e', '--epitope_dir', type=str, required=True, help='path to directory containing neoepiscope results' ) parser.add_argument('-o', '--output_dir', type=str, req...
0
0
0
0
0
0
0
0
0
890d178c676ecd50a60d734f255ddca0ec47c78f
3,285
py
Python
Bite_30/directors.py
alehpineda/bitesofpy
bfd319a606cd0b7b9bfb85a3e8942872a2d43c48
[ "MIT" ]
null
null
null
Bite_30/directors.py
alehpineda/bitesofpy
bfd319a606cd0b7b9bfb85a3e8942872a2d43c48
[ "MIT" ]
2
2020-09-24T11:25:29.000Z
2021-06-25T15:43:35.000Z
Bite_30/directors.py
alehpineda/bitesofpy
bfd319a606cd0b7b9bfb85a3e8942872a2d43c48
[ "MIT" ]
null
null
null
""" In this Bite we are going to parse a csv movie dataset to identify the directors with the highest rated movies. Write get_movies_by_director: use csv.DictReader to convert movie_metadata.csv into a (default)dict of lists of Movie namedtuples. Convert/filter the data: Only extract director_name, movie_title, ...
32.205882
79
0.698326
""" In this Bite we are going to parse a csv movie dataset to identify the directors with the highest rated movies. Write get_movies_by_director: use csv.DictReader to convert movie_metadata.csv into a (default)dict of lists of Movie namedtuples. Convert/filter the data: Only extract director_name, movie_title, ...
0
0
0
0
0
0
0
0
0
cf7f6a09c0194541dc06ad7936613b05006e7476
576
py
Python
python-service/main.py
spinscale/spring-boot-reactive-observability-demo
3bf604d56b1dab7fc1004d0449394f03fbefe36e
[ "Apache-2.0" ]
1
2021-11-09T10:59:48.000Z
2021-11-09T10:59:48.000Z
python-service/main.py
spinscale/spring-boot-reactive-observability-demo
3bf604d56b1dab7fc1004d0449394f03fbefe36e
[ "Apache-2.0" ]
1
2021-10-14T03:26:25.000Z
2021-10-14T03:26:25.000Z
python-service/main.py
spinscale/spring-boot-reactive-observability-demo
3bf604d56b1dab7fc1004d0449394f03fbefe36e
[ "Apache-2.0" ]
2
2021-10-21T09:35:32.000Z
2021-11-04T04:44:26.000Z
from flask import Flask import logging from elasticapm.contrib.flask import ElasticAPM app = Flask(__name__) apm = ElasticAPM(app, logging=logging.INFO, server_url="", service_name="", secret_token="", use_elastic_traceparent_header=True) if __name_...
26.181818
69
0.652778
from flask import Flask, render_template import requests import logging from elasticapm.contrib.flask import ElasticAPM app = Flask(__name__) apm = ElasticAPM(app, logging=logging.INFO, server_url="", service_name="", secret_token="", use_elastic_tra...
0
158
0
0
0
0
0
11
45
36157007102c366e9396f698edabc672ce401d96
21,519
py
Python
3rdparty/pytorch/aten/src/ATen/gen.py
WoodoLee/TorchCraft
999f68aab9e7d50ed3ae138297226dc95fefc458
[ "MIT" ]
null
null
null
3rdparty/pytorch/aten/src/ATen/gen.py
WoodoLee/TorchCraft
999f68aab9e7d50ed3ae138297226dc95fefc458
[ "MIT" ]
null
null
null
3rdparty/pytorch/aten/src/ATen/gen.py
WoodoLee/TorchCraft
999f68aab9e7d50ed3ae138297226dc95fefc458
[ "MIT" ]
null
null
null
import argparse import os import sys from os import path sys.path.append(path.dirname(path.abspath(__file__))) from code_template import CodeTemplate # This file is the top-level entry point for code generation in ATen. # It takes an arbitrary number of arguments specifying metadata files to # process (.cwrap, .yam...
40.297753
116
0.654677
import argparse import os import yaml from collections import OrderedDict import sys from os import path sys.path.append(path.dirname(path.abspath(__file__))) import cwrap_parser import nn_parse import native_parse import preprocess_declarations import function_wrapper from code_template import CodeTemplate # Thi...
0
0
0
2,239
312
12,767
0
5
407
4d1d1716e02005f61fb72dbfc3c3b208cea80e95
928
py
Python
batch_apps/maintenance.py
azam-a/batcher
3e22f017b23bc22d0bec6eced4c94ee56e3b36f9
[ "MIT" ]
null
null
null
batch_apps/maintenance.py
azam-a/batcher
3e22f017b23bc22d0bec6eced4c94ee56e3b36f9
[ "MIT" ]
null
null
null
batch_apps/maintenance.py
azam-a/batcher
3e22f017b23bc22d0bec6eced4c94ee56e3b36f9
[ "MIT" ]
null
null
null
def sizeof_formatter(num, suffix='B'): ''' http://stackoverflow.com/a/1094933/3480790 ''' for unit in ['', 'Ki', 'Mi', 'Gi', 'Ti', 'Pi', 'Ei', 'Zi']: if abs(num) < 1024.0: return "%3.1f %s%s" % (num, unit, suffix) num /= 1024.0
23.2
67
0.633621
from django.db import connection from django_mailbox.models import Message import os import sqlite3 def get_sqlite_filesize(path='db.sqlite3'): try: filesize_unformatted = os.path.getsize(path) filesize_humanised = sizeof_formatter(filesize_unformatted) return filesize_humanised excep...
0
0
0
0
0
481
0
12
158
92968d1ca9e4c2efba5ab077c714407fe89064eb
1,558
py
Python
kisensum/openadr/openadr/vtn/migrations/0024_auto_20171114_1830.py
ChargePoint/volttron-applications
8d99c01a93f7c1ea98d4e4b0cfcefe85fe26320b
[ "BSD-3-Clause" ]
null
null
null
kisensum/openadr/openadr/vtn/migrations/0024_auto_20171114_1830.py
ChargePoint/volttron-applications
8d99c01a93f7c1ea98d4e4b0cfcefe85fe26320b
[ "BSD-3-Clause" ]
4
2021-03-19T23:36:34.000Z
2021-12-13T19:45:54.000Z
kisensum/openadr/openadr/vtn/migrations/0024_auto_20171114_1830.py
ChargePoint/volttron-applications
8d99c01a93f7c1ea98d4e4b0cfcefe85fe26320b
[ "BSD-3-Clause" ]
1
2020-05-25T05:03:55.000Z
2020-05-25T05:03:55.000Z
# -*- coding: utf-8 -*- # Generated by Django 1.11.5 on 2017-11-14 18:30 from __future__ import unicode_literals
38
156
0.622593
# -*- coding: utf-8 -*- # Generated by Django 1.11.5 on 2017-11-14 18:30 from __future__ import unicode_literals import datetime from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('vtn', '0023_auto_20171114_1801'), ] ...
0
0
0
1,330
0
0
0
24
90
3e201980c04abca62021dc11be5a9a0c88a5ec60
1,454
py
Python
yo/db/watch_table.py
dpays/dsocial-notifications
32b1cdcd58d622407fd50206053c5b9735a56ba9
[ "MIT" ]
10
2017-10-22T20:07:40.000Z
2018-08-01T21:48:49.000Z
yo/db/watch_table.py
dpays/dsocial-notifications
32b1cdcd58d622407fd50206053c5b9735a56ba9
[ "MIT" ]
81
2017-08-19T15:38:32.000Z
2020-05-12T09:56:14.000Z
yo/db/watch_table.py
dpays/dsocial-notifications
32b1cdcd58d622407fd50206053c5b9735a56ba9
[ "MIT" ]
9
2017-09-19T07:12:20.000Z
2021-05-25T17:09:27.000Z
#! /usr/bin/env python # -*- coding: utf-8 -*- import structlog logger = structlog.get_logger() if __name__ == "__main__": watch()
33.045455
115
0.746905
#! /usr/bin/env python # -*- coding: utf-8 -*- import asyncio import click import yo.yolog import json import structlog logger = structlog.get_logger() def channel_callback(conn,pid,channel,payload): logger.info('NOTIFY',conn=conn,pid=pid, channel=channel, payload_type=type(payload), payload=payload) async def ...
0
409
648
0
0
132
0
-32
158
86b98754a623648df26ed3db8f65e6340af8979b
804
py
Python
numpy_test/numpy_k.py
linyang23/AI-Python-Code-Implementations-with-Notes
af729c652a301b199d568d5989adc5ed6413dcf9
[ "MIT" ]
null
null
null
numpy_test/numpy_k.py
linyang23/AI-Python-Code-Implementations-with-Notes
af729c652a301b199d568d5989adc5ed6413dcf9
[ "MIT" ]
null
null
null
numpy_test/numpy_k.py
linyang23/AI-Python-Code-Implementations-with-Notes
af729c652a301b199d568d5989adc5ed6413dcf9
[ "MIT" ]
null
null
null
# coding=utf-8 # # import numpy as np a = np.array([1, 2, 3]) b = np.array([4, 5, 6]) c = np.append(a, b) print(c) #appendconcatenate d = np.concatenate([a, b]) print(d) # import numpy as np a = np.arange(4).reshape(2, 2) b = np.arange(4).reshape(2, 2) # c = np.append(a, b, axis = 0) print(c) print("", c.shape) # d =...
13.862069
34
0.597015
# coding=utf-8 #数据合并与展平 #合并一维数组 import numpy as np a = np.array([1, 2, 3]) b = np.array([4, 5, 6]) c = np.append(a, b) print(c) #上面使用append,下面使用concatenate d = np.concatenate([a, b]) print(d) #多维数组的合并 import numpy as np a = np.arange(4).reshape(2, 2) b = np.arange(4).reshape(2, 2) #按行合并 c = np.append(a, b, axis = 0) ...
384
0
0
0
0
0
0
0
0
bde8ec6ac413ae679322ae5061e85f54b3da49a7
10,630
py
Python
esperclient/api/group_commands_api.py
pallavigopi/esper-client-py
f7e71d3f25a5d91f35628b414e8abe9e6849d316
[ "Apache-2.0" ]
null
null
null
esperclient/api/group_commands_api.py
pallavigopi/esper-client-py
f7e71d3f25a5d91f35628b414e8abe9e6849d316
[ "Apache-2.0" ]
null
null
null
esperclient/api/group_commands_api.py
pallavigopi/esper-client-py
f7e71d3f25a5d91f35628b414e8abe9e6849d316
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 """ ESPER API REFERENCE OpenAPI spec version: 1.0.0 Contact: developer@esper.io --------------------------------------------------------- Copyright 2019 Shoonya Enterprises Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the Li...
39.516729
111
0.637159
# coding: utf-8 """ ESPER API REFERENCE OpenAPI spec version: 1.0.0 Contact: developer@esper.io --------------------------------------------------------- Copyright 2019 Shoonya Enterprises Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the Li...
0
0
0
9,723
0
0
0
0
91
0998038f175ff046091b18ec0c1927a4b3ab1967
1,746
py
Python
Tree_Two_Sum_BST.py
tw7613781/leetcode
954a7288c21f315e664927b707b800d4d1d2bd6f
[ "Apache-2.0" ]
null
null
null
Tree_Two_Sum_BST.py
tw7613781/leetcode
954a7288c21f315e664927b707b800d4d1d2bd6f
[ "Apache-2.0" ]
1
2021-05-11T19:27:47.000Z
2021-05-11T19:27:47.000Z
Tree_Two_Sum_BST.py
tw7613781/leetcode
954a7288c21f315e664927b707b800d4d1d2bd6f
[ "Apache-2.0" ]
null
null
null
# https://leetcode.com/problems/two-sum-iv-input-is-a-bst/description/ # brute-force algorithm, but in BST, finding a element is O(log(n)),that is the advantage head = treeNode(2) head.left = treeNode(1) head.right = treeNode(3) solution = Solution() print(solution.findTarget(head,4))
30.103448
110
0.56071
# https://leetcode.com/problems/two-sum-iv-input-is-a-bst/description/ # brute-force algorithm, but in BST, finding a element is O(log(n)),that is the advantage class treeNode: def __init__(self,val): self.val = val self.left = None self.right = None class Solution: def findTarget(sel...
0
0
0
1,414
0
0
0
0
46
6a65f81117dc66041c5767160ce1307755c65e4f
2,214
py
Python
azure-servicefabric/azure/servicefabric/models/upgrade_orchestration_service_state_summary.py
Christina-Kang/azure-sdk-for-python
bbf982eb06aab04b8151f69f1d230b7f5fb96ebf
[ "MIT" ]
1
2022-03-30T22:39:15.000Z
2022-03-30T22:39:15.000Z
azure-servicefabric/azure/servicefabric/models/upgrade_orchestration_service_state_summary.py
Christina-Kang/azure-sdk-for-python
bbf982eb06aab04b8151f69f1d230b7f5fb96ebf
[ "MIT" ]
54
2016-03-25T17:25:01.000Z
2018-10-22T17:27:54.000Z
azure-servicefabric/azure/servicefabric/models/upgrade_orchestration_service_state_summary.py
Christina-Kang/azure-sdk-for-python
bbf982eb06aab04b8151f69f1d230b7f5fb96ebf
[ "MIT" ]
2
2017-01-20T18:25:46.000Z
2017-05-12T21:31:47.000Z
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
46.125
164
0.692412
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
0
0
0
1,677
0
0
0
17
46
07c01c7556206faa6b28364e85a706cca1888fd2
3,843
py
Python
lambda/py/lambda_function.py
iJos/alexa-skill-boilerplate
28f0de0b9e1142f02dc18ce816eb188ca6449425
[ "MIT" ]
7
2018-12-01T17:46:45.000Z
2019-01-11T13:22:40.000Z
lambda/py/lambda_function.py
iJos/alexa-skill-boilerplate
28f0de0b9e1142f02dc18ce816eb188ca6449425
[ "MIT" ]
null
null
null
lambda/py/lambda_function.py
iJos/alexa-skill-boilerplate
28f0de0b9e1142f02dc18ce816eb188ca6449425
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # From: https://github.com/alexa/skill-sample-python-helloworld-classes/blob/master/lambda/py/hello_world.py import logging from ask_sdk_core.skill_builder import SkillBuilder sb = SkillBuilder() logger = logging.getLogger(__name__) logger.setLevel(logging.INFO) sb.add_request_handle...
32.567797
108
0.745251
# -*- coding: utf-8 -*- # From: https://github.com/alexa/skill-sample-python-helloworld-classes/blob/master/lambda/py/hello_world.py import logging from ask_sdk_core.skill_builder import SkillBuilder from ask_sdk_core.dispatch_components import ( AbstractRequestHandler, AbstractExceptionHandler, AbstractRequ...
0
0
0
2,718
0
0
0
242
249
2d9288e53c6d647ef90c501dd7fe42a5de23c7f5
444
py
Python
setup.py
streamDream/mysql-stream
1786594441290f30e0e1b07c6ffcec3ab9f7c192
[ "MIT" ]
2
2020-09-23T09:20:00.000Z
2020-09-23T09:25:18.000Z
setup.py
streamDream/mysql-stream
1786594441290f30e0e1b07c6ffcec3ab9f7c192
[ "MIT" ]
null
null
null
setup.py
streamDream/mysql-stream
1786594441290f30e0e1b07c6ffcec3ab9f7c192
[ "MIT" ]
null
null
null
from setuptools import setup, find_packages setup( name="mysql-stream", packages=find_packages(), version='0.0.4', description="simple and easy to use MySQL client and ORM library", author="chenchong", author_email='boy3565@163.com', url="https://github.com/streamDream/mysql-stream", ke...
24.666667
70
0.63964
from setuptools import setup, find_packages setup( name="mysql-stream", packages=find_packages(), version='0.0.4', description="simple and easy to use MySQL client and ORM library", author="chenchong", author_email='boy3565@163.com', url="https://github.com/streamDream/mysql-stream", ke...
0
0
0
0
0
0
0
0
0
7fda18638567fbeb4196dc0d0863b73577956494
113
py
Python
oauth2_provider/__init__.py
sfx/django-oauth-toolkit
08ce1d63bfad16905a7d9f758591c0e8c65706ec
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
oauth2_provider/__init__.py
sfx/django-oauth-toolkit
08ce1d63bfad16905a7d9f758591c0e8c65706ec
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
oauth2_provider/__init__.py
sfx/django-oauth-toolkit
08ce1d63bfad16905a7d9f758591c0e8c65706ec
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
__version__ = '0.7.4' __author__ = "Massimiliano Pippi & Federico Frenguelli" VERSION = __version__ # synonym
18.833333
55
0.743363
__version__ = '0.7.4' __author__ = "Massimiliano Pippi & Federico Frenguelli" VERSION = __version__ # synonym
0
0
0
0
0
0
0
0
0
5daa5d7e7193050a2cca8aeffc7d030e15070f52
2,935
py
Python
Model/snf.py
Jivi2478/SNF
0911979f53570febfd96482692225ebda474764f
[ "Apache-2.0" ]
null
null
null
Model/snf.py
Jivi2478/SNF
0911979f53570febfd96482692225ebda474764f
[ "Apache-2.0" ]
null
null
null
Model/snf.py
Jivi2478/SNF
0911979f53570febfd96482692225ebda474764f
[ "Apache-2.0" ]
1
2022-01-23T13:06:45.000Z
2022-01-23T13:06:45.000Z
# -*- coding: utf-8 -*- """SNF.ipynb Automatically generated by Colaboratory. Original file is located at https://colab.research.google.com/drive/15jbQLqhfFg0702_O2gy-0oXndCGRACOP """ import pandas as pd import numpy as np import matplotlib.pyplot as plt import seaborn as sns import pickle #importing dataset d...
22.929688
86
0.763203
# -*- coding: utf-8 -*- """SNF.ipynb Automatically generated by Colaboratory. Original file is located at https://colab.research.google.com/drive/15jbQLqhfFg0702_O2gy-0oXndCGRACOP """ import pandas as pd import numpy as np import matplotlib.pyplot as plt import seaborn as sns import pickle #importing dataset d...
0
0
0
0
0
0
0
21
23
e69ec9e916937952bc8e27a9428f3637564da38b
1,653
py
Python
ffcv/transforms/replace_label.py
neuroailab/ffcv
43d249762d32ce873678a9b8d7983ae653ad6f84
[ "Apache-2.0" ]
1
2022-01-25T05:04:34.000Z
2022-01-25T05:04:34.000Z
ffcv/transforms/replace_label.py
neuroailab/ffcv
43d249762d32ce873678a9b8d7983ae653ad6f84
[ "Apache-2.0" ]
null
null
null
ffcv/transforms/replace_label.py
neuroailab/ffcv
43d249762d32ce873678a9b8d7983ae653ad6f84
[ "Apache-2.0" ]
1
2022-02-25T15:58:42.000Z
2022-02-25T15:58:42.000Z
""" Replace label """ from typing import Tuple
29.517857
105
0.669691
""" Replace label """ from collections.abc import Sequence from typing import Tuple import numpy as np from numpy import dtype from numpy.core.numeric import indices from numpy.random import rand from typing import Callable, Optional, Tuple from ..pipeline.allocation_query import AllocationQuery from ..pipeline.operat...
0
0
0
1,213
0
0
0
149
244
f7babefdbf6786ea78ab2c0d5e4907b75650c13d
517
py
Python
Jetbrain/blog/migrations/0002_auto_20190907_1933.py
uyo-obong/jetbrain_django
63f267efadb148f1c5afcce3801b3ff173a1dabf
[ "MIT" ]
null
null
null
Jetbrain/blog/migrations/0002_auto_20190907_1933.py
uyo-obong/jetbrain_django
63f267efadb148f1c5afcce3801b3ff173a1dabf
[ "MIT" ]
null
null
null
Jetbrain/blog/migrations/0002_auto_20190907_1933.py
uyo-obong/jetbrain_django
63f267efadb148f1c5afcce3801b3ff173a1dabf
[ "MIT" ]
null
null
null
# Generated by Django 2.2.4 on 2019-09-07 19:33
21.541667
51
0.555126
# Generated by Django 2.2.4 on 2019-09-07 19:33 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('blog', '0001_initial'), ] operations = [ migrations.AlterField( model_name='post', name='slug', field=mo...
0
0
0
403
0
0
0
19
46
594c8f61dd838b1903f8555cde3efc98090cb213
977
py
Python
sliding_rate_limiter/backends/base.py
kalibrr/sliding_rate_limiter
d5a553401d15192cc68c1ad7f7c6218786cc3c34
[ "Apache-2.0" ]
null
null
null
sliding_rate_limiter/backends/base.py
kalibrr/sliding_rate_limiter
d5a553401d15192cc68c1ad7f7c6218786cc3c34
[ "Apache-2.0" ]
317
2018-07-05T06:34:09.000Z
2022-03-28T00:57:19.000Z
sliding_rate_limiter/backends/base.py
kalibrr/sliding_rate_limiter
d5a553401d15192cc68c1ad7f7c6218786cc3c34
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import unicode_literals from __future__ import division from __future__ import print_function from __future__ import absolute_import
31.516129
101
0.688843
# -*- coding: utf-8 -*- from __future__ import unicode_literals from __future__ import division from __future__ import print_function from __future__ import absolute_import import abc import six class RateLimiterBackend(six.with_metaclass(abc.ABCMeta, object)): """ A backend that implements an atomic ``lea...
0
0
0
755
0
0
0
-22
69
8ffc1b65bd14843d7a23021140990238d192b5be
2,502
py
Python
app/spider/cdut.py
anlance/cdut2016
4f96b92d83a4bfc051b7b04ebdd5740aaed623a1
[ "MIT" ]
null
null
null
app/spider/cdut.py
anlance/cdut2016
4f96b92d83a4bfc051b7b04ebdd5740aaed623a1
[ "MIT" ]
1
2020-04-17T09:55:38.000Z
2020-04-17T09:55:38.000Z
app/spider/cdut.py
anlance/cdut2016
4f96b92d83a4bfc051b7b04ebdd5740aaed623a1
[ "MIT" ]
null
null
null
ua = 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36' headers = { 'User-Agent': ua } # news # news init_news()
30.512195
133
0.627098
from datetime import datetime import re import requests from app.spider.spider_utils import get_int_from_str ua = 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36' headers = { 'User-Agent': ua } # 得到目前已有的所有news def init_news(): ur...
138
0
0
0
0
2,101
0
21
132
78f47c7c24aba4eb22d39b4084710f27377eea6c
344
py
Python
components/commons/navbar.py
nikitosboroda/theme
f2e1bd8a4662f7d82ad22f9b03bea740518c1771
[ "Apache-2.0" ]
null
null
null
components/commons/navbar.py
nikitosboroda/theme
f2e1bd8a4662f7d82ad22f9b03bea740518c1771
[ "Apache-2.0" ]
null
null
null
components/commons/navbar.py
nikitosboroda/theme
f2e1bd8a4662f7d82ad22f9b03bea740518c1771
[ "Apache-2.0" ]
null
null
null
from flask import request, render_template def render_navbar(context, slot, payload): # pylint: disable=R0201,W0613 """ Base template slot """ chapter = request.args.get('chapter', '') module = request.args.get('module', '') return render_template("common/navbar.html", active_chapter=chapter, module=...
38.222222
103
0.718023
from flask import request, render_template def render_navbar(context, slot, payload): # pylint: disable=R0201,W0613 """ Base template slot """ chapter = request.args.get('chapter', '') module = request.args.get('module', '') return render_template("common/navbar.html", active_chapter=chapter, module=...
0
0
0
0
0
0
0
0
0
f6ebdc0659711e065f90ca39ee32771805fc71d8
1,672
py
Python
cauldron/test/runner/test_reload_libraries.py
JohnnyPeng18/cauldron
09120c2a4cef65df46f8c0c94f5d79395b3298cd
[ "MIT" ]
90
2016-09-02T15:11:10.000Z
2022-01-02T11:37:57.000Z
cauldron/test/runner/test_reload_libraries.py
JohnnyPeng18/cauldron
09120c2a4cef65df46f8c0c94f5d79395b3298cd
[ "MIT" ]
86
2016-09-23T16:52:22.000Z
2022-03-31T21:39:56.000Z
cauldron/test/runner/test_reload_libraries.py
JohnnyPeng18/cauldron
09120c2a4cef65df46f8c0c94f5d79395b3298cd
[ "MIT" ]
261
2016-12-22T05:36:48.000Z
2021-11-26T12:40:42.000Z
import random def _mock_reload_module(history: dict, path: str, library_directory: str): """Mocked version of the runner.__init__._reload_module function.""" output = {"path": path, "library_directory": library_directory} if path not in history and random.random() > 0.5: history[path] = output ...
33.44
80
0.729067
import functools import pathlib import random from unittest.mock import MagicMock from unittest.mock import patch import pytest import cauldron from cauldron import runner def _mock_reload_module(history: dict, path: str, library_directory: str): """Mocked version of the runner.__init__._reload_module function....
0
1,020
0
0
0
0
0
4
202
c542c60f451e1ce5545123d8c302fc2bf0cc5908
4,069
py
Python
DRMM/utils.py
RandolphVI/Deep-Relevance-Ranking
7282113a9f5c1e5082fe360323a6930830a70f17
[ "Apache-2.0" ]
9
2019-02-28T08:59:03.000Z
2021-02-26T15:56:36.000Z
DRMM/utils.py
RandolphVI/Deep-Relevance-Ranking
7282113a9f5c1e5082fe360323a6930830a70f17
[ "Apache-2.0" ]
null
null
null
DRMM/utils.py
RandolphVI/Deep-Relevance-Ranking
7282113a9f5c1e5082fe360323a6930830a70f17
[ "Apache-2.0" ]
1
2019-12-18T14:43:08.000Z
2019-12-18T14:43:08.000Z
import re # For BioASQ only when using years 1-4 as training and 5 as dev/test. # Get rid of 2017/2018 plus 2016 in training. # For competition, training get rid of 2017/2018 and test 2018. bioclean = lambda t: re.sub('[.,?;*!%^&_+():-\[\]{}]', '', t.replace('"', '').replace('/', '').replace('\\', '').replace("'", ''...
31.789063
154
0.565987
import json import re import numpy import dynet as dy import random def leaky_relu(x): return dy.bmax(.1*x, x) def uwords(words): uw = {} for w in words: uw[w] = 1 return [w for w in uw] def ubigrams(words): uw = {} prevw = "<pw>" for w in words: uw[prevw + '_' + w] = 1 prevw = w return [...
0
0
0
0
0
3,435
0
-30
317
cf56e12ac894a39bfd605348f20d63a062df3202
10,541
py
Python
test/Tools/test_reduction.py
AntoineSIMTEK/NuMPI
1723ec17696d413867f4fcfc7ad6079adbef4e2b
[ "MIT" ]
null
null
null
test/Tools/test_reduction.py
AntoineSIMTEK/NuMPI
1723ec17696d413867f4fcfc7ad6079adbef4e2b
[ "MIT" ]
null
null
null
test/Tools/test_reduction.py
AntoineSIMTEK/NuMPI
1723ec17696d413867f4fcfc7ad6079adbef4e2b
[ "MIT" ]
null
null
null
# # Copyright 2018, 2020 Antoine Sanner # 2019 Lars Pastewka # # ### MIT license # # 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 ...
28.336022
79
0.553268
# # Copyright 2018, 2020 Antoine Sanner # 2019 Lars Pastewka # # ### MIT license # # 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 ...
0
4,539
0
0
0
3,480
0
4
414
48f7a086f0c3b2f028cc0ccf03b72df80002e0c4
40,385
py
Python
deepobs/analyzer/analyze_utils.py
pnorridge/DeepOBS
33c2fcd88b76041e8f6dd50f4bf380a914c8fa4f
[ "MIT" ]
91
2019-03-20T03:36:04.000Z
2022-03-14T16:03:50.000Z
deepobs/analyzer/analyze_utils.py
pnorridge/DeepOBS
33c2fcd88b76041e8f6dd50f4bf380a914c8fa4f
[ "MIT" ]
27
2019-08-30T07:36:56.000Z
2022-02-09T23:57:37.000Z
deepobs/analyzer/analyze_utils.py
pnorridge/DeepOBS
33c2fcd88b76041e8f6dd50f4bf380a914c8fa4f
[ "MIT" ]
32
2019-03-13T12:05:22.000Z
2022-01-26T17:57:21.000Z
import numpy as np import pandas as pd import matplotlib.pyplot as plt from matplotlib2tikz import get_tikz_code from .. import tensorflow def beautify_lr_sensitivity(fig, ax): """Beautify a learning rate sensitivity plot. This function adds axis labels and removes spines to create a nicer learning ...
40.385
170
0.597152
import os import json import numpy as np import pandas as pd import matplotlib.pyplot as plt from matplotlib2tikz import save as tikz_save from matplotlib2tikz import get_tikz_code from .. import tensorflow class Analyzer: """DeepOBS analyzer class to generate result plots or get other summaries. Args: ...
0
0
0
24,254
0
0
0
2
181
3f0aa16a265dd67a1a8dd8836907b1f91b7baab9
407
py
Python
tests/test_isrctn.py
almeidaah/collectors
f03096855b8d702969d22af0b20a4d6a0d820bd0
[ "MIT" ]
17
2016-06-28T21:20:21.000Z
2022-03-02T16:31:25.000Z
tests/test_isrctn.py
almeidaah/collectors
f03096855b8d702969d22af0b20a4d6a0d820bd0
[ "MIT" ]
41
2016-04-04T10:36:45.000Z
2017-04-24T10:04:57.000Z
tests/test_isrctn.py
kenferrara/collectors
e6c1f45df3a1ffd5d60dada1816484812eb51417
[ "MIT" ]
25
2016-05-18T09:27:42.000Z
2021-03-21T14:44:31.000Z
# -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals # Tests
23.941176
67
0.781327
# -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals from importlib import import_module from collectors.isrctn.spider import _make_start_urls # Tests def test_make_start_urls(): result = _mak...
0
0
0
0
0
110
0
46
68
638a6363ec2227e6b5a31883a275d16159669e8d
951
py
Python
setup.py
sinyawskiy/django-tagging
da00169d1e9be6b960842111ea0db2dced47cc3f
[ "BSD-3-Clause" ]
null
null
null
setup.py
sinyawskiy/django-tagging
da00169d1e9be6b960842111ea0db2dced47cc3f
[ "BSD-3-Clause" ]
null
null
null
setup.py
sinyawskiy/django-tagging
da00169d1e9be6b960842111ea0db2dced47cc3f
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python """ Based entirely on Django's own ``setup.py``. """ from setuptools import setup, find_packages from tagging.version import __version__ setup( name = 'django-tagging', version = __version__, description = 'Generic tagging application for Django', author = 'Jonathan Buchanan', ...
30.677419
60
0.580442
#!/usr/bin/env python """ Based entirely on Django's own ``setup.py``. """ from setuptools import setup, find_packages from tagging.version import __version__ setup( name = 'django-tagging', version = __version__, description = 'Generic tagging application for Django', author = 'Jonathan Buchanan', ...
0
0
0
0
0
0
0
0
0
8ba198301cb60d307f46580423106734163cecdc
1,032
py
Python
setup.py
sudharshanakshay/CovidStatusIndia
86e7a85c445caa00937e9f923b48d07d3c8cf529
[ "MIT" ]
null
null
null
setup.py
sudharshanakshay/CovidStatusIndia
86e7a85c445caa00937e9f923b48d07d3c8cf529
[ "MIT" ]
null
null
null
setup.py
sudharshanakshay/CovidStatusIndia
86e7a85c445caa00937e9f923b48d07d3c8cf529
[ "MIT" ]
null
null
null
from setuptools import setup, find_packages from pip._internal.req import parse_requirements install_requirements = parse_requirements('requirements.txt', session=False) reqs = [str(ir.req) for ir in install_requirements] VERSION = '0.0.1' DESCRIPTION = 'Covid-19 Data Extractor - India' LONG_DESCRIPTION = 'Extracts ...
34.4
116
0.70155
from setuptools import setup, find_packages from pip._internal.req import parse_requirements install_requirements = parse_requirements('requirements.txt', session=False) reqs = [str(ir.req) for ir in install_requirements] VERSION = '0.0.1' DESCRIPTION = 'Covid-19 Data Extractor - India' LONG_DESCRIPTION = 'Extracts ...
0
0
0
0
0
0
0
0
0
b32610b31117f02fefdde2db9faea2f82488aed4
11,100
py
Python
MetaScreener/external_sw/mgltools/MGLToolsPckgs/CADD/Raccoon2/gui/SlidingRange.py
bio-hpc/metascreener
6900497629f601c4b6c0c37da26de58ffa221988
[ "Apache-2.0" ]
8
2021-12-14T21:30:01.000Z
2022-02-14T11:30:03.000Z
MetaScreener/external_sw/mgltools/MGLToolsPckgs/CADD/Raccoon2/gui/SlidingRange.py
bio-hpc/metascreener
6900497629f601c4b6c0c37da26de58ffa221988
[ "Apache-2.0" ]
null
null
null
MetaScreener/external_sw/mgltools/MGLToolsPckgs/CADD/Raccoon2/gui/SlidingRange.py
bio-hpc/metascreener
6900497629f601c4b6c0c37da26de58ffa221988
[ "Apache-2.0" ]
null
null
null
# # AutoDock | Raccoon2 # # Copyright 2013, Stefano Forli, Michel Sanner # Molecular Graphics Lab # # The Scripps Research Institute # _ # (,) T h e # _/ # (.) S c r i p p s # \_ # (,) R e s e a r c h # ./ # ...
37.627119
122
0.544144
# # AutoDock | Raccoon2 # # Copyright 2013, Stefano Forli, Michel Sanner # Molecular Graphics Lab # # The Scripps Research Institute # _ # (,) T h e # _/ # (.) S c r i p p s # \_ # (,) R e s e a r c h # ./ # ...
0
0
0
9,666
0
0
0
0
23
ddeededc8acd213299cc8370e864e567dfcd3e43
32,394
py
Python
extracts/extract_pipeline.py
AnuragSinghChaudhary/demo
4425b7ae6f48a2ff92892bf36f54c51a4b8f8423
[ "MIT" ]
12
2018-05-17T08:34:38.000Z
2022-01-12T16:56:43.000Z
extracts/extract_pipeline.py
AnuragSinghChaudhary/demo
4425b7ae6f48a2ff92892bf36f54c51a4b8f8423
[ "MIT" ]
null
null
null
extracts/extract_pipeline.py
AnuragSinghChaudhary/demo
4425b7ae6f48a2ff92892bf36f54c51a4b8f8423
[ "MIT" ]
7
2018-03-22T16:00:53.000Z
2021-12-15T06:58:49.000Z
""" This script finds, imports, filters and validates one or several raw gtfs files. Preparations: - Identify needed rawfolders from to_publish.csv -> browse trough all; create list of all feeds: city, feed, date1, date2, date3... - Check that all subfeeds are available for the wanted extract period (download date)...
46.409742
207
0.616534
import datetime import os import subprocess import sys from os import listdir from zipfile import ZipFile import zipfile import pandas import yaml from feed_manager import FeedManager from gtfspy import exports, filter, import_validator, timetable_validator, util from gtfspy.gtfs import GTFS from gtfspy.aggregate_sto...
0
19,515
0
7,461
0
3,484
0
323
467
2de768d459127a3e996d3f085f76c0c0de097923
9,244
py
Python
src/ggpzero/util/symmetry.py
ggplib/ggplearn
52164bcd6f43d648736e1ae9e556a7f6412339d1
[ "MIT" ]
61
2019-01-25T11:08:36.000Z
2022-03-04T12:50:57.000Z
src/ggpzero/util/symmetry.py
ggplib/ggplearn
52164bcd6f43d648736e1ae9e556a7f6412339d1
[ "MIT" ]
12
2019-01-17T10:34:16.000Z
2021-08-25T14:40:44.000Z
src/ggpzero/util/symmetry.py
ggplib/ggplearn
52164bcd6f43d648736e1ae9e556a7f6412339d1
[ "MIT" ]
11
2019-01-07T04:16:12.000Z
2021-10-19T15:01:41.000Z
def rotate_90(x, y, x_cords, y_cords): ' anti-clockwise ' assert len(x_cords) == len(y_cords) x_idx = x_cords.index(x) y_idx = y_cords.index(y) return x_cords[y_idx], y_cords[len(x_cords) - x_idx - 1] symbol_factory = None
33.860806
104
0.651017
from ggplib.util.symbols import SymbolFactory, ListTerm, Term def reflect_vertical(x, y, x_cords, y_cords): x_idx = x_cords.index(x) return x_cords[len(x_cords) - x_idx - 1], y def reflect_horizontal(x, y, x_cords, y_cords): y_idx = y_cords.index(y) return x, y_cords[len(y_cords) - y_idx - 1] def ...
0
0
0
7,682
0
1,108
0
40
160
cffcdbc6641e90c7707a595bcd474589600f58dc
10,413
py
Python
AlarmClock/AppliedComputingFinal.py
jacobsiepker/CollegeProjects
d0f2f3935007bccebb604540967210994c847c64
[ "CC0-1.0" ]
null
null
null
AlarmClock/AppliedComputingFinal.py
jacobsiepker/CollegeProjects
d0f2f3935007bccebb604540967210994c847c64
[ "CC0-1.0" ]
null
null
null
AlarmClock/AppliedComputingFinal.py
jacobsiepker/CollegeProjects
d0f2f3935007bccebb604540967210994c847c64
[ "CC0-1.0" ]
null
null
null
import time from gpiozero import Button import os import pygame import pyowm ### Switch, Pick, Update Functions ### Helpers for routine functions ############### #picks a background color, each call shifts hue by one degree #Call in while loop for gradual color change ### For User Output, convert time format ...
25.397561
183
0.622203
from datetime import datetime import time from gpiozero import Button import os import pygame from tinytag import TinyTag from random import * from guizero import * from colorsys import hsv_to_rgb import pyowm ### Switch, Pick, Update Functions ### Helpers for routine functions ############### def switchOff(): g...
0
0
0
0
0
5,912
0
23
538
371c9981cee8065d9a3187ee6801eb777e23438d
14,122
py
Python
mysql-utilities-1.6.0/mysql/utilities/common/binary_log_file.py
bopopescu/mysql-dbcompare
1e912fd87282be3b3bed48487e6beb0ecb1de339
[ "Apache-2.0" ]
2
2018-03-20T07:42:58.000Z
2018-03-20T07:43:49.000Z
mysql-utilities-1.6.0/mysql/utilities/common/binary_log_file.py
bopopescu/mysql-dbcompare
1e912fd87282be3b3bed48487e6beb0ecb1de339
[ "Apache-2.0" ]
null
null
null
mysql-utilities-1.6.0/mysql/utilities/common/binary_log_file.py
bopopescu/mysql-dbcompare
1e912fd87282be3b3bed48487e6beb0ecb1de339
[ "Apache-2.0" ]
1
2020-07-23T23:07:08.000Z
2020-07-23T23:07:08.000Z
# # Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; version 2 of the License. # # This program is distributed in the hope...
42.155224
79
0.622362
# # Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; version 2 of the License. # # This program is distributed in the hope...
0
0
0
0
0
0
0
0
0
842d3bdeadae512a252ade0258af90d708c395d0
3,620
py
Python
src/models/DGV7/model_v7.py
ChihabEddine98/DeepGo
d072841e387b1fc8c5244ce4f4f547f81da4b46a
[ "MIT" ]
8
2022-02-02T10:04:16.000Z
2022-03-17T10:41:14.000Z
src/models/DGV7/model_v7.py
ChihabEddine98/DeepGo
d072841e387b1fc8c5244ce4f4f547f81da4b46a
[ "MIT" ]
null
null
null
src/models/DGV7/model_v7.py
ChihabEddine98/DeepGo
d072841e387b1fc8c5244ce4f4f547f81da4b46a
[ "MIT" ]
null
null
null
# imports import tensorflow.nn as nn from utils import DotDict # end imports # continue from 450 epochs to 2500 # Train : python train.py -gpu 2 -s 1 -e 1200 -b 1024 config = DotDict({ 'n_filters' : 192, 'kernel' : 5, 'n_res_blocks' : 8, 'l2_reg'...
40.222222
116
0.602486
# imports import os import collections import tensorflow.nn as nn from tensorflow.keras import Input,Model from tensorflow.keras.utils import plot_model from tensorflow.keras import layers, regularizers,activations from utils import DotDict,configs from models.DGV0.model_v0 import DGM # end imports # continue from 450...
0
0
0
2,602
0
0
0
91
154
15477092edcefdc0543295a2deeb280d142ac9ad
29
py
Python
simple_api/adapters/graphql/constants.py
karlosss/simple_api
03f87035c648f161d5e7a59b24f4e04bd34399f1
[ "MIT" ]
2
2020-11-13T14:00:06.000Z
2020-12-19T11:50:22.000Z
simple_api/adapters/graphql/constants.py
ladal1/simple_api
1b5d560476bccad9f68a7331d092dbdb68c48bf7
[ "MIT" ]
5
2021-02-04T14:27:43.000Z
2021-06-04T23:22:24.000Z
simple_api/adapters/graphql/constants.py
ladal1/simple_api
1b5d560476bccad9f68a7331d092dbdb68c48bf7
[ "MIT" ]
1
2021-01-06T13:54:38.000Z
2021-01-06T13:54:38.000Z
INPUT_CLASS_SUFFIX = "Input"
14.5
28
0.793103
INPUT_CLASS_SUFFIX = "Input"
0
0
0
0
0
0
0
0
0
ad8aafe0dbc6114276eec4b5d348966d83fb6f64
58,401
py
Python
code/code_for_PDBbind2013.py
LiuXiangMath/Hypergraph-based-Persistent-Cohomology
560a3b8deef08215982cbb16ad12f16a5e1f02a5
[ "Apache-2.0" ]
3
2020-12-17T13:41:02.000Z
2020-12-17T15:04:44.000Z
code/code_for_PDBbind2013.py
LiuXiangMath/Hypergraph-based-Persistent-Cohomology
560a3b8deef08215982cbb16ad12f16a5e1f02a5
[ "Apache-2.0" ]
null
null
null
code/code_for_PDBbind2013.py
LiuXiangMath/Hypergraph-based-Persistent-Cohomology
560a3b8deef08215982cbb16ad12f16a5e1f02a5
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- import numpy as np import math Protein_Atom = ['C','N','O','S'] Ligand_Atom = ['C','N','O','S','P','F','Cl','Br','I'] aa_list = ['ALA','ARG','ASN','ASP','CYS','GLU','GLN','GLY','HIS','HSE','HSD','SEC', 'ILE','LEU','LYS','MET','PHE','PRO','SER','THR','TRP','TYR','VAL','PYL'] pre = ...
43.582836
240
0.494358
# -*- coding: utf-8 -*- import numpy as np import math from sklearn.ensemble import GradientBoostingRegressor from sklearn.metrics import mean_squared_error import scipy as sp Protein_Atom = ['C','N','O','S'] Ligand_Atom = ['C','N','O','S','P','F','Cl','Br','I'] aa_list = ['ALA','ARG','ASN','ASP','CYS','GLU','GLN','...
0
0
0
0
0
4,084
0
55
310
93fc1dd768f522c9754a5a586362b138f63bb493
159
py
Python
tm/__init__.py
ibejohn818/tm
6582fd68d30317737fbd1936057224a2288bc929
[ "MIT" ]
null
null
null
tm/__init__.py
ibejohn818/tm
6582fd68d30317737fbd1936057224a2288bc929
[ "MIT" ]
1
2021-03-25T21:45:10.000Z
2021-03-25T21:45:10.000Z
tm/__init__.py
ibejohn818/tm
6582fd68d30317737fbd1936057224a2288bc929
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """Top-level package for Tmux Session Helper.""" __author__ = """John Hardy""" __email__ = 'john.hardy@me.com' __version__ = '0.1.0'
19.875
48
0.63522
# -*- coding: utf-8 -*- """Top-level package for Tmux Session Helper.""" __author__ = """John Hardy""" __email__ = 'john.hardy@me.com' __version__ = '0.1.0'
0
0
0
0
0
0
0
0
0
4c2f7f010bb36a1b149b6ed4a2993bec6ebd5275
454
py
Python
traffic/urls.py
zyayoung/lab-item-tracking
6d0ee000114300d6693ec078f974b9a6ef4dfe40
[ "MIT" ]
4
2019-01-14T15:44:22.000Z
2019-01-16T16:07:19.000Z
traffic/urls.py
zyayoung/lab-item-tracking
6d0ee000114300d6693ec078f974b9a6ef4dfe40
[ "MIT" ]
2
2019-02-01T00:50:20.000Z
2019-02-22T15:15:54.000Z
traffic/urls.py
zyayoung/lab-item-tracking
6d0ee000114300d6693ec078f974b9a6ef4dfe40
[ "MIT" ]
null
null
null
from django.conf.urls import url from traffic import views app_name = 'traffic' urlpatterns = [ # url(r'^$', views.index), # url(r'^index/', views.index), url(r'^traffic/pages/$', views.page_view, name='performance'), url(r'^traffic/calender/$', views.calender_view, name='calender'), url(r'^traff...
30.266667
79
0.674009
from django.conf.urls import url from traffic import views app_name = 'traffic' urlpatterns = [ # url(r'^$', views.index), # url(r'^index/', views.index), url(r'^traffic/pages/$', views.page_view, name='performance'), url(r'^traffic/calender/$', views.calender_view, name='calender'), url(r'^traff...
0
0
0
0
0
0
0
0
0
505aa41c67cd2ed4b63a6e36f75de2f82d28a41f
1,337
py
Python
accounts/urls.py
Alwin1847207/Hackathon
473adea12822cbe2be9a7525ac29391659f0ab6b
[ "bzip2-1.0.6" ]
null
null
null
accounts/urls.py
Alwin1847207/Hackathon
473adea12822cbe2be9a7525ac29391659f0ab6b
[ "bzip2-1.0.6" ]
null
null
null
accounts/urls.py
Alwin1847207/Hackathon
473adea12822cbe2be9a7525ac29391659f0ab6b
[ "bzip2-1.0.6" ]
null
null
null
from django.urls import path, include from accounts import views urlpatterns = [ path('', views.indx, name='accounts'), <<<<<<< HEAD path('/signup', views.signup, name='signup'), path('logout', views.logout, name='logout'), path('/login', views.loginn, name='login'), path('/usertpe/<int:pk>/', vie...
46.103448
80
0.670157
from django.urls import path, include from accounts import views urlpatterns = [ path('', views.indx, name='accounts'), <<<<<<< HEAD path('/signup', views.signup, name='signup'), path('logout', views.logout, name='logout'), path('/login', views.loginn, name='login'), path('/usertpe/<int:pk>/', vie...
0
0
0
0
0
0
0
0
0
3ab8da9645179c73a62da6edd4b18e895e3c8ecc
61
py
Python
applications/silverlance/__init__.py
triflesoft/django-application-silverlance
5bfa0d1d5dfb29eb784e43f36797ed8063d9e125
[ "BSD-3-Clause" ]
null
null
null
applications/silverlance/__init__.py
triflesoft/django-application-silverlance
5bfa0d1d5dfb29eb784e43f36797ed8063d9e125
[ "BSD-3-Clause" ]
null
null
null
applications/silverlance/__init__.py
triflesoft/django-application-silverlance
5bfa0d1d5dfb29eb784e43f36797ed8063d9e125
[ "BSD-3-Clause" ]
null
null
null
default_app_config = 'silverlance.apps.SilverlanceAppConfig'
30.5
60
0.868852
default_app_config = 'silverlance.apps.SilverlanceAppConfig'
0
0
0
0
0
0
0
0
0
b704428032a68287a446ffa22b449eed0c4d3477
7,778
py
Python
scratch_wiki.py
tjvr/scratch-wiki-client
04d935781ea2961470b37029b8c4d5e20158954e
[ "MIT" ]
1
2016-03-17T18:25:26.000Z
2016-03-17T18:25:26.000Z
scratch_wiki.py
tjvr/scratch-wiki-client
04d935781ea2961470b37029b8c4d5e20158954e
[ "MIT" ]
1
2018-07-14T18:52:29.000Z
2018-07-14T18:52:29.000Z
scratch_wiki.py
tjvr/scratch-wiki-client
04d935781ea2961470b37029b8c4d5e20158954e
[ "MIT" ]
null
null
null
""" A really simple MediaWiki API client for the Scratch Wiki. Can: * read pages * edit pages * list pages in category * list page backlinks ("what links here") * list page transclusions Requires the `requests` library. http://wiki.scratch.mit.edu/ Example Usage ============= Get a page:: wiki = S...
25.669967
92
0.525714
""" A really simple MediaWiki API client for the Scratch Wiki. Can: * read pages * edit pages * list pages in category * list page backlinks ("what links here") * list page transclusions Requires the `requests` library. http://wiki.scratch.mit.edu/ Example Usage ============= Get a page:: wiki = S...
0
96
0
6,330
0
0
0
-9
160
5e74d36026bb02646328df8a81b51f1a25db5f72
6,955
py
Python
plugins/modules/panos_commit_panorama.py
Nothing4You/pan-os-ansible
50078a71eef0c5e9a4263020135df6a0e05961bf
[ "Apache-2.0" ]
null
null
null
plugins/modules/panos_commit_panorama.py
Nothing4You/pan-os-ansible
50078a71eef0c5e9a4263020135df6a0e05961bf
[ "Apache-2.0" ]
null
null
null
plugins/modules/panos_commit_panorama.py
Nothing4You/pan-os-ansible
50078a71eef0c5e9a4263020135df6a0e05961bf
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright 2020 Palo Alto Networks, Inc # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # #...
31.613636
96
0.661251
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright 2020 Palo Alto Networks, Inc # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # #...
0
0
0
0
0
2,683
0
126
94
a860cef0e934467f7c1597b0b8fe5e6449065aef
3,682
py
Python
algorithm/kmax.py
wangyongjie-ntu/GUM
09691059d3f0bbe9788ed08aa1fe68c88966a968
[ "MIT" ]
null
null
null
algorithm/kmax.py
wangyongjie-ntu/GUM
09691059d3f0bbe9788ed08aa1fe68c88966a968
[ "MIT" ]
null
null
null
algorithm/kmax.py
wangyongjie-ntu/GUM
09691059d3f0bbe9788ed08aa1fe68c88966a968
[ "MIT" ]
1
2021-09-06T06:18:02.000Z
2021-09-06T06:18:02.000Z
import numpy as np import random import time import copy def kmax(data, init_centriod, L = 2, K = 3, max_iterations = 50): ''' data: a collection of records init_centriod: the inital centriod L: top K attributes K: cluster numbers max_iterations: the max iteration before stop ''' star...
34.411215
111
0.599131
import numpy as np import random import time import copy def kmax(data, init_centriod, L = 2, K = 3, max_iterations = 50): ''' data: a collection of records init_centriod: the inital centriod L: top K attributes K: cluster numbers max_iterations: the max iteration before stop ''' star...
0
0
0
0
0
0
0
0
0
e025f5a766dade21ee38467fd1d7c3fb826fc616
16,581
py
Python
RQ1_RQ2/Vehicle_case_study/Pymoo_GA/road_gen.py
dgumenyuk/Environment_generation
092fbecdc208f84aa58f2ccd3522262984e79cda
[ "MIT" ]
null
null
null
RQ1_RQ2/Vehicle_case_study/Pymoo_GA/road_gen.py
dgumenyuk/Environment_generation
092fbecdc208f84aa58f2ccd3522262984e79cda
[ "MIT" ]
null
null
null
RQ1_RQ2/Vehicle_case_study/Pymoo_GA/road_gen.py
dgumenyuk/Environment_generation
092fbecdc208f84aa58f2ccd3522262984e79cda
[ "MIT" ]
null
null
null
''' Module to generate the TC with the given probability to "go straight", "turn left" or "turn right" ''' if __name__ == "__main__": # steps = [5, 6, 7] i = 0 road = RoadGen(250, 5, 50, 10, 70) while i < 100: # generate N number of schedules print("generating test case" + str(i)) ...
38.470998
98
0.37742
''' Module to generate the TC with the given probability to "go straight", "turn left" or "turn right" ''' import numpy as np from car_road import Map import os import config as cf import json class RoadGen: """Class for generating roads""" def __init__( self, map_size, min_len, #...
0
0
0
16,072
0
0
0
-24
136
4b32f82ea884446c3a0243b93ffc476b9356d61c
3,175
py
Python
barry/datasets/dummy.py
AaronGlanville/Barry
f181448b2ed10a8c08195e7e34819ceb8abfe532
[ "MIT" ]
null
null
null
barry/datasets/dummy.py
AaronGlanville/Barry
f181448b2ed10a8c08195e7e34819ceb8abfe532
[ "MIT" ]
null
null
null
barry/datasets/dummy.py
AaronGlanville/Barry
f181448b2ed10a8c08195e7e34819ceb8abfe532
[ "MIT" ]
null
null
null
import logging import numpy as np if __name__ == "__main__": logging.basicConfig(level=logging.DEBUG, format="[%(levelname)7s |%(funcName)18s] %(message)s") dataset = DummyPowerSpectrum_SDSS_DR12_Z061_NGC() data = dataset.get_data() import matplotlib.pyplot as plt import seaborn as sb im...
36.918605
125
0.668031
import logging from scipy.interpolate import splev, splrep import numpy as np from barry.cosmology import pk2xi from barry.cosmology.camb_generator import getCambGenerator from barry.datasets import PowerSpectrum_SDSS_DR12_Z061_NGC, CorrelationFunction_SDSS_DR12_Z061_NGC class DummyPowerSpectrum_SDSS_DR12_Z061_NGC(P...
0
0
0
2,374
0
0
0
150
135
f847e50b19a49843e449cfa5833f7f5953c0356a
1,529
py
Python
website_monitor/utils/scheduler.py
KappaLambda/website-monitor
2823e36d8089723fb3cca4ba9284f4754dd3d2cf
[ "MIT" ]
null
null
null
website_monitor/utils/scheduler.py
KappaLambda/website-monitor
2823e36d8089723fb3cca4ba9284f4754dd3d2cf
[ "MIT" ]
null
null
null
website_monitor/utils/scheduler.py
KappaLambda/website-monitor
2823e36d8089723fb3cca4ba9284f4754dd3d2cf
[ "MIT" ]
null
null
null
import logging logger = logging.getLogger(__name__)
31.854167
77
0.679529
import logging from datetime import datetime import django_rq from api.models import CheckTaskJob from utils.check_url import check_url logger = logging.getLogger(__name__) def schedule(check_task): scheduler = django_rq.get_scheduler('default', interval=10) try: job = scheduler.schedule( ...
0
0
0
0
0
1,305
0
33
136
6a5979e35ae35b16b232f164213c0ce01d7bdc57
1,727
py
Python
MuonGun/resources/scripts/fitting/fit_rdist.py
hschwane/offline_production
e14a6493782f613b8bbe64217559765d5213dc1e
[ "MIT" ]
1
2020-12-24T22:00:01.000Z
2020-12-24T22:00:01.000Z
MuonGun/resources/scripts/fitting/fit_rdist.py
hschwane/offline_production
e14a6493782f613b8bbe64217559765d5213dc1e
[ "MIT" ]
null
null
null
MuonGun/resources/scripts/fitting/fit_rdist.py
hschwane/offline_production
e14a6493782f613b8bbe64217559765d5213dc1e
[ "MIT" ]
3
2020-07-17T09:20:29.000Z
2021-03-30T16:44:18.000Z
#!/usr/bin/env python from optparse import OptionParser parser = OptionParser(usage="%prog infile outfile") opts, args = parser.parse_args() try: infile, outfile = args except ValueError: infile = "/data/uwa/jvansanten/projects/2012/muongun/corsika/SIBYLL/Hoerandel5/atmod_12.hdf5" outfile = "Hoerandel5_atmod12_SIB...
37.543478
133
0.738854
#!/usr/bin/env python from optparse import OptionParser parser = OptionParser(usage="%prog infile outfile") opts, args = parser.parse_args() try: infile, outfile = args except ValueError: infile = "/data/uwa/jvansanten/projects/2012/muongun/corsika/SIBYLL/Hoerandel5/atmod_12.hdf5" outfile = "Hoerandel5_atmod12_SIB...
0
0
0
0
0
0
0
15
0
282ba9d7a05ae894ba9605dbaa2a601f0198fc9b
3,431
py
Python
executiveorder/processors/wikisource.py
chrisengelsma/executive_orders
5f0c7102b9abce3d44b54e5dd4c57bd0bb404037
[ "MIT" ]
2
2017-03-23T02:26:05.000Z
2017-08-24T02:07:17.000Z
executiveorder/processors/wikisource.py
chrisengelsma/executive_orders
5f0c7102b9abce3d44b54e5dd4c57bd0bb404037
[ "MIT" ]
null
null
null
executiveorder/processors/wikisource.py
chrisengelsma/executive_orders
5f0c7102b9abce3d44b54e5dd4c57bd0bb404037
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- from executiveorder.executiveorder import ExecutiveOrder base_url = "https://en.wikisource.org" url = "/wiki/Category:United_States_executive_orders" eos = [] def get_all_pages(url): ''' Gets all the pages in the base site. ''' soup = get_soup(base_url+url) l...
23.340136
75
0.645001
#!/usr/bin/env python # -*- coding: utf-8 -*- from executiveorder.util import * from executiveorder.executiveorder import ExecutiveOrder base_url = "https://en.wikisource.org" url = "/wiki/Category:United_States_executive_orders" eos = [] def run(): pages = get_all_pages(url) for page in pages: print page,'.....
0
0
0
0
0
130
0
12
45
d7133c4a92f3ff0cce7398bb4696d9c8aa2a540b
815
py
Python
tests/issues/test_issue_459.py
XiangyiZhao/heterocl
fe69d532e7f64ee8b76419f4ff05b0cc27c77e8a
[ "Apache-2.0" ]
null
null
null
tests/issues/test_issue_459.py
XiangyiZhao/heterocl
fe69d532e7f64ee8b76419f4ff05b0cc27c77e8a
[ "Apache-2.0" ]
1
2020-06-01T01:41:29.000Z
2020-06-01T01:41:29.000Z
tests/issues/test_issue_459.py
XiangyiZhao/heterocl
fe69d532e7f64ee8b76419f4ff05b0cc27c77e8a
[ "Apache-2.0" ]
null
null
null
if __name__ == "__main__": test()
23.285714
54
0.509202
import heterocl as hcl def reduce(b, w, q): bw = hcl.get_bitwidth(q.dtype) bwh = bw // 2 mask = (1 << bwh) - 1 b = hcl.scalar(b, "b", dtype=hcl.UInt(bw)) w = hcl.scalar(w, "w", dtype=hcl.UInt(bw)) q = hcl.scalar(q, "q", dtype=hcl.UInt(bw)) a = w * b for i in range(2): t = (-a...
0
0
0
0
0
707
0
1
68
b56dae7549336a201f155c6bf722542d1df8bb93
1,383
py
Python
Python/Problem#7.py
Wolfy7/DailyCodingProblem
dcca0da51bf42413c2eeff122dbb653e73ab5d83
[ "MIT" ]
null
null
null
Python/Problem#7.py
Wolfy7/DailyCodingProblem
dcca0da51bf42413c2eeff122dbb653e73ab5d83
[ "MIT" ]
null
null
null
Python/Problem#7.py
Wolfy7/DailyCodingProblem
dcca0da51bf42413c2eeff122dbb653e73ab5d83
[ "MIT" ]
null
null
null
""" Given the mapping a = 1, b = 2, ... z = 26, and an encoded message, count the number of ways it can be decoded. For example, the message '111' would give 3, since it could be decoded as 'aaa', 'ka', and 'ak'. You can assume that the messages are decodable. For example, '001' is not allowed. """ import ti...
22.672131
112
0.616775
""" Given the mapping a = 1, b = 2, ... z = 26, and an encoded message, count the number of ways it can be decoded. For example, the message '111' would give 3, since it could be decoded as 'aaa', 'ka', and 'ak'. You can assume that the messages are decodable. For example, '001' is not allowed. """ import ti...
0
0
0
0
0
664
0
0
100
4584fc5ed9194906f974bdb397f201c7c7eb28f6
433
py
Python
hanchi/sandbox2.py
simazhi/ideophones
c986ee60bb1d61b27cbda8a9054a40d77ee50c41
[ "MIT" ]
1
2018-04-10T06:55:38.000Z
2018-04-10T06:55:38.000Z
hanchi/sandbox2.py
simazhi/ideophones
c986ee60bb1d61b27cbda8a9054a40d77ee50c41
[ "MIT" ]
null
null
null
hanchi/sandbox2.py
simazhi/ideophones
c986ee60bb1d61b27cbda8a9054a40d77ee50c41
[ "MIT" ]
null
null
null
from selenium import webdriver import os import time #"./chromedriver" PROJECT_ROOT = os.path.abspath(os.path.dirname(__file__)) DRIVER_BIN = os.path.join(PROJECT_ROOT, "chromedriver.exe") browser = webdriver.Chrome(executable_path = DRIVER_BIN) browser.get("https://en.wiktionary.org/wiki/Wiktionary:Main_Page") ti...
22.789474
66
0.787529
from selenium import webdriver from selenium.webdriver.common.keys import Keys import os import time #"./chromedriver" PROJECT_ROOT = os.path.abspath(os.path.dirname(__file__)) DRIVER_BIN = os.path.join(PROJECT_ROOT, "chromedriver.exe") browser = webdriver.Chrome(executable_path = DRIVER_BIN) browser.get("https://...
0
0
0
0
0
0
0
26
22
cae2f694a8963adda63826c93c9f8f02e7f333ab
15,040
py
Python
koku/koku/configurator.py
Vasyka/koku
b5aa9ec41c3b0821e74afe9ff3a5ffaedb910614
[ "Apache-2.0" ]
2
2022-01-12T03:42:39.000Z
2022-01-12T03:42:40.000Z
koku/koku/configurator.py
Vasyka/koku
b5aa9ec41c3b0821e74afe9ff3a5ffaedb910614
[ "Apache-2.0" ]
null
null
null
koku/koku/configurator.py
Vasyka/koku
b5aa9ec41c3b0821e74afe9ff3a5ffaedb910614
[ "Apache-2.0" ]
1
2021-07-21T09:33:59.000Z
2021-07-21T09:33:59.000Z
# # Copyright 2021 Red Hat Inc. # SPDX-License-Identifier: Apache-2.0 # """ Handler module for gathering configuration data. """ from .env import ENVIRONMENT CLOWDER_ENABLED = ENVIRONMENT.bool("CLOWDER_ENABLED", default=False) if CLOWDER_ENABLED: CONFIGURATOR = ConfigFactory.get_configurator()
30.08
107
0.646277
# # Copyright 2021 Red Hat Inc. # SPDX-License-Identifier: Apache-2.0 # """ Handler module for gathering configuration data. """ from .env import ENVIRONMENT CLOWDER_ENABLED = ENVIRONMENT.bool("CLOWDER_ENABLED", default=False) if CLOWDER_ENABLED: from app_common_python import ObjectBuckets, LoadedConfig, KafkaTop...
0
12,055
0
2,494
0
0
0
70
118
42a221214e1330a592de45c4a1a76295348a08fe
737
py
Python
py2/Problem067.py
DanielGarrett/ProjectEuler
ca23f4dbfb2a47ea663fb0858630d3e2fb3b9764
[ "MIT" ]
null
null
null
py2/Problem067.py
DanielGarrett/ProjectEuler
ca23f4dbfb2a47ea663fb0858630d3e2fb3b9764
[ "MIT" ]
null
null
null
py2/Problem067.py
DanielGarrett/ProjectEuler
ca23f4dbfb2a47ea663fb0858630d3e2fb3b9764
[ "MIT" ]
null
null
null
import EulerRunner numFile = open('../data/Problem067_numbers.txt', 'r') nums = [[int(num) for num in line.split(' ')] for line in numFile.readlines()] print len(nums) print len(nums[-1]) EulerRunner.solve_problem(problem67_dp)
26.321429
78
0.572592
import EulerRunner numFile = open('../data/Problem067_numbers.txt', 'r') nums = [[int(num) for num in line.split(' ')] for line in numFile.readlines()] print len(nums) print len(nums[-1]) def problem67_dp(): totals = [] for x in range(len(nums)): totals.append([]) for y in range(len(nums[x])):...
0
0
0
0
0
484
0
0
23
698146b46b7075c1458a16bc4122497ee5798c02
8,352
py
Python
tfsnippet/scaffold/model.py
haowen-xu/tfsnippet-pre-alpha
31eb2cf692ac25b95cc815aaca53754d6db42d9f
[ "MIT" ]
null
null
null
tfsnippet/scaffold/model.py
haowen-xu/tfsnippet-pre-alpha
31eb2cf692ac25b95cc815aaca53754d6db42d9f
[ "MIT" ]
null
null
null
tfsnippet/scaffold/model.py
haowen-xu/tfsnippet-pre-alpha
31eb2cf692ac25b95cc815aaca53754d6db42d9f
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- __all__ = ['Model']
34.945607
80
0.59818
# -*- coding: utf-8 -*- import os import shutil import numpy as np import six import tensorflow as tf from tfsnippet.utils import (ensure_variables_initialized, VarScopeObject, get_variables_as_dict, reopen_variable_scope, ...
0
426
0
7,471
0
0
0
252
157
9078e5c3f0833a45386708e9e11f8a773ced1cbe
620
py
Python
src/make_data_set/src/test.py
diddytpq/Predict-Tennisball-LandingPoint
0ae4a9ff45fd4dd82b4b4e3cc2533e7fd5d1506a
[ "MIT" ]
null
null
null
src/make_data_set/src/test.py
diddytpq/Predict-Tennisball-LandingPoint
0ae4a9ff45fd4dd82b4b4e3cc2533e7fd5d1506a
[ "MIT" ]
null
null
null
src/make_data_set/src/test.py
diddytpq/Predict-Tennisball-LandingPoint
0ae4a9ff45fd4dd82b4b4e3cc2533e7fd5d1506a
[ "MIT" ]
null
null
null
import rospy import roslib import time roslib.load_manifest('mecanum_robot_gazebo') if __name__ == '__main__' : rospy.init_node('pingpong') mecanum_0 = Make_mecanum_left('mecanum_0') #mecanum_0.torque = [0, -2000000, 0] #mecanum_0.torque = [0, 0, 2000000] #mecanum_0.torque = [0, 0, 0] ...
16.756757
46
0.645161
import rospy import sys, select, os import roslib import time from tool.test_utils import * roslib.load_manifest('mecanum_robot_gazebo') if __name__ == '__main__' : rospy.init_node('pingpong') mecanum_0 = Make_mecanum_left('mecanum_0') #mecanum_0.torque = [0, -2000000, 0] #mecanum_0.torque = ...
0
0
0
0
0
0
0
9
45
5863984ebe31a84c0b664f96e59e0fcfea843fa5
1,323
py
Python
get_lyrics.py
ShaylanDias/MusicalMessage
16d3b7bdde4fdfe19e82d21f3aa63a7c2ae4a9a5
[ "MIT" ]
null
null
null
get_lyrics.py
ShaylanDias/MusicalMessage
16d3b7bdde4fdfe19e82d21f3aa63a7c2ae4a9a5
[ "MIT" ]
null
null
null
get_lyrics.py
ShaylanDias/MusicalMessage
16d3b7bdde4fdfe19e82d21f3aa63a7c2ae4a9a5
[ "MIT" ]
null
null
null
import azapi api = azapi.AZlyrics() def get_lyrics(artist, title, dir='./', save=False): """artist=name of artist, title=name of song, dir=directory to save (if saving), save=save the lyrics in a text file (boolean input)""" attempts = 0 val = None title_lower = title.lower() if ' feat' in title_l...
41.34375
139
0.598639
import azapi api = azapi.AZlyrics() def get_lyrics(artist, title, dir='./', save=False): """artist=name of artist, title=name of song, dir=directory to save (if saving), save=save the lyrics in a text file (boolean input)""" attempts = 0 val = None title_lower = title.lower() if ' feat' in title_l...
0
0
0
0
0
0
0
0
0
7b894340af50b8faa94449a69811b8e548990c61
225
py
Python
Twper/__init__.py
fergusch/Twper
01a536453a2b38400e1006063e3bd65b7c224f4a
[ "MIT" ]
8
2018-12-17T20:12:53.000Z
2022-01-06T19:52:59.000Z
Twper/__init__.py
fergusch/Twper
01a536453a2b38400e1006063e3bd65b7c224f4a
[ "MIT" ]
3
2019-12-04T04:14:16.000Z
2021-05-05T10:43:00.000Z
Twper/__init__.py
fergusch/Twper
01a536453a2b38400e1006063e3bd65b7c224f4a
[ "MIT" ]
3
2019-01-15T15:34:27.000Z
2020-02-29T18:23:21.000Z
# Twper - Async Twitter Scraper # Copyright Sacha Jungerman # See LICENSE for details. __version__ = '0.1.1' __author__ = 'Sacha Jungerman' __license__ = 'MIT'
20.454545
61
0.755556
# Twper - Async Twitter Scraper # Copyright Sacha Jungerman # See LICENSE for details. __version__ = '0.1.1' __author__ = 'Sacha Jungerman' __license__ = 'MIT' from Twper.Twper import Tweet, TwitterAccount, Query, Queries
0
0
0
0
0
0
0
40
23
a8f19d9c8f7c0b2ba72c4f98f2d753de57803390
771
py
Python
fcm.py
stevexiaofei/Worm_seg_net
99114bb3f221baa4df4c93d6e282ae288aa63cfc
[ "MIT" ]
null
null
null
fcm.py
stevexiaofei/Worm_seg_net
99114bb3f221baa4df4c93d6e282ae288aa63cfc
[ "MIT" ]
null
null
null
fcm.py
stevexiaofei/Worm_seg_net
99114bb3f221baa4df4c93d6e282ae288aa63cfc
[ "MIT" ]
null
null
null
import numpy as np import PIL.Image as image from skfuzzy.cluster import cmeans imgData,row,col = loadData('11.jpg') imgData = imgData.T center, u, u0, d, jm, p, fpc = cmeans(imgData, m=2, c=2, error=0.0001, maxiter=1000) for i in u: label = np.argmax(u, axis=0) label = label.reshape([row,col]) pic_new = image.new("L...
29.653846
84
0.645914
import numpy as np import PIL.Image as image from sklearn.cluster import KMeans from skfuzzy.cluster import cmeans def loadData(filePath): f = open(filePath,'rb') data = [] img = image.open(f) m,n = img.size for i in range(m): for j in range(n): x,y,z = img.getpixel((i,j)) data.append([x/256.0,...
0
0
0
0
0
241
0
13
44
04b2959d17659eb1b0417a4fd0929232a6e8350a
3,042
py
Python
conary/build/buildinfo.py
sassoftware/conary
d418968acd5e11ee17ed6d91ca395ea10a040222
[ "Apache-2.0" ]
43
2015-03-31T01:37:10.000Z
2021-11-14T16:26:48.000Z
conary/build/buildinfo.py
sassoftware/conary
d418968acd5e11ee17ed6d91ca395ea10a040222
[ "Apache-2.0" ]
9
2015-06-10T16:39:41.000Z
2020-01-27T16:35:01.000Z
conary/build/buildinfo.py
sassoftware/conary
d418968acd5e11ee17ed6d91ca395ea10a040222
[ "Apache-2.0" ]
9
2015-04-07T08:12:37.000Z
2020-01-26T09:54:18.000Z
# # Copyright (c) SAS Institute Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in w...
31.360825
76
0.530901
# # Copyright (c) SAS Institute Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in w...
0
0
0
2,286
0
0
0
-10
46
c4ce33a8f78d5a5a31f73757124a1f2cb356730e
505
py
Python
一、工程基础/软件工程/算法与数据结构/力扣题目/leetcode_027.py
ethan-sui/AI-algorithm-engineer-knowledge
24795b23a4cbeb6e6839e0cae65f7745be666da6
[ "Apache-2.0" ]
209
2020-10-06T08:34:45.000Z
2022-03-08T08:35:15.000Z
一、工程基础/软件工程/算法与数据结构/力扣题目/leetcode_027.py
ethan-sui/AI-algorithm-engineer-knowledge
24795b23a4cbeb6e6839e0cae65f7745be666da6
[ "Apache-2.0" ]
null
null
null
一、工程基础/软件工程/算法与数据结构/力扣题目/leetcode_027.py
ethan-sui/AI-algorithm-engineer-knowledge
24795b23a4cbeb6e6839e0cae65f7745be666da6
[ "Apache-2.0" ]
8
2020-10-09T09:07:18.000Z
2021-05-18T10:30:46.000Z
# 27 # # # O(n)O(1) nums = [0, 1, 2, 2, 3, 0, 4, 2] val = 2 print(removeElement0(nums, val))
24.047619
45
0.550495
# 27、移除元素 # 一、双指针法,设置快慢指针,当快指针指向元素等于删除元素时,快指针快走一步, # 慢指针不走;否则,快慢指针同时走一步,并把快指针的元素值赋给慢指针,这样 # 慢指针走过的元素就是删除掉指定元素的数组,时间复杂度O(n),空间复杂度O(1) def removeElement0(nums, val): if len(nums) == 0: return 0 left = 0 right = 0 while right < len(nums): if nums[right] != val: nums[left] ...
333
0
0
0
0
271
0
0
22
b72c1e7ed93592b637ce1f8cbcd881bc56c9db22
2,772
py
Python
migration/src/plots/plots/eta_tau_sfh.py
rcooke-ast/VICE
762911eb4192c7206ce2ae36b645d120ed889cb7
[ "MIT" ]
22
2018-09-26T21:02:51.000Z
2022-03-24T18:07:03.000Z
migration/src/plots/plots/eta_tau_sfh.py
rcooke-ast/VICE
762911eb4192c7206ce2ae36b645d120ed889cb7
[ "MIT" ]
2
2019-05-03T13:08:27.000Z
2021-02-17T20:11:37.000Z
migration/src/plots/plots/eta_tau_sfh.py
rcooke-ast/VICE
762911eb4192c7206ce2ae36b645d120ed889cb7
[ "MIT" ]
3
2019-05-10T19:26:31.000Z
2021-11-10T08:13:42.000Z
r""" This script creates a plot of the mass-loading factor eta and the star formation e-folding timescale as functions of Galactocentric radius in the forms adopted by Johnson et al. (2021). """ from .. import env from ...simulations.models.insideout import insideout from .utils import named_colors import matplotlib.p...
29.489362
77
0.672439
r""" This script creates a plot of the mass-loading factor eta and the star formation e-folding timescale as functions of Galactocentric radius in the forms adopted by Johnson et al. (2021). """ from .. import env from ...simulations.models.insideout import insideout from .utils import named_colors import matplotlib.p...
0
0
0
0
0
0
0
-5
22
e00f288d0375b73a08aef40a686f363fd5cc8285
3,757
py
Python
grodddroid/BranchExplorer/branchexp/grodd_cmd.py
demirdagemir/thesis
4a48bddf815c91729e27484548bb7bbf7ddeda64
[ "MIT" ]
null
null
null
grodddroid/BranchExplorer/branchexp/grodd_cmd.py
demirdagemir/thesis
4a48bddf815c91729e27484548bb7bbf7ddeda64
[ "MIT" ]
null
null
null
grodddroid/BranchExplorer/branchexp/grodd_cmd.py
demirdagemir/thesis
4a48bddf815c91729e27484548bb7bbf7ddeda64
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 """ BranchExplorer is the high-level tool that tries to explore specific parts of code rather than maximizing coverage like regular automatic testing. """ import logging import branchexp.imports log = logging.getLogger("branchexp") try: import coloredlogs coloredlogs.install( sh...
33.247788
80
0.640405
#!/usr/bin/env python3 """ BranchExplorer is the high-level tool that tries to explore specific parts of code rather than maximizing coverage like regular automatic testing. """ import argparse import logging import os import sys import time import datetime import branchexp.imports import branchexp.config from branch...
0
0
0
0
0
2,884
0
18
246
8601e4823b3e141dfce88dfecc7ba7a12da3b018
252
py
Python
frekenbok/settings/test_sqlite.py
frekenbok/frekenbok
296e6cffba5a58c1c8d61ff6eb4d0aed3f3b4247
[ "MIT" ]
null
null
null
frekenbok/settings/test_sqlite.py
frekenbok/frekenbok
296e6cffba5a58c1c8d61ff6eb4d0aed3f3b4247
[ "MIT" ]
null
null
null
frekenbok/settings/test_sqlite.py
frekenbok/frekenbok
296e6cffba5a58c1c8d61ff6eb4d0aed3f3b4247
[ "MIT" ]
null
null
null
import tempfile DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': tempfile.mkstemp(suffix='.sqlite3', prefix='frekenbok_')[1], } }
21
76
0.654762
import tempfile from frekenbok.settings import * from frekenbok.settings.dev import * DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': tempfile.mkstemp(suffix='.sqlite3', prefix='frekenbok_')[1], } }
0
0
0
0
0
0
0
26
45
e0c70e3b3415e57515bd901ff801d9bbb258a66c
10,506
py
Python
pl_bolts/models/autoencoders/components.py
btwardow/pytorch-lightning-bolts
4a7b6ffe0fcbeee37f8bac6af1e926469b2052bf
[ "Apache-2.0" ]
1
2021-06-28T03:24:11.000Z
2021-06-28T03:24:11.000Z
pl_bolts/models/autoencoders/components.py
btwardow/pytorch-lightning-bolts
4a7b6ffe0fcbeee37f8bac6af1e926469b2052bf
[ "Apache-2.0" ]
null
null
null
pl_bolts/models/autoencoders/components.py
btwardow/pytorch-lightning-bolts
4a7b6ffe0fcbeee37f8bac6af1e926469b2052bf
[ "Apache-2.0" ]
null
null
null
from torch import nn def conv3x3(in_planes, out_planes, stride=1): """3x3 convolution with padding""" return nn.Conv2d(in_planes, out_planes, kernel_size=3, stride=stride, padding=1, bias=False) def conv1x1(in_planes, out_planes, stride=1): """1x1 convolution""" return nn.Conv2d(in_planes, out_plan...
30.189655
105
0.616314
import torch import torch.nn.functional as F from torch import nn class Interpolate(nn.Module): """nn.Module wrapper for F.interpolate""" def __init__(self, size=None, scale_factor=None): super().__init__() self.size, self.scale_factor = size, scale_factor def forward(self, x): r...
0
0
0
8,722
0
502
0
1
297
ea67ca0d9bc4bc63a271bc2aef8c4f13fd22a99c
3,694
py
Python
lib/utils.py
Chaffelson/cml_curvefitting
6173021fd60a02b0a3a31b4c969ae58fb5adaa06
[ "MIT" ]
2
2021-01-31T05:57:40.000Z
2021-02-02T17:37:05.000Z
lib/utils.py
Chaffelson/cml_curvefitting
6173021fd60a02b0a3a31b4c969ae58fb5adaa06
[ "MIT" ]
null
null
null
lib/utils.py
Chaffelson/cml_curvefitting
6173021fd60a02b0a3a31b4c969ae58fb5adaa06
[ "MIT" ]
1
2021-04-29T10:20:55.000Z
2021-04-29T10:20:55.000Z
# ########################################################################### # # CLOUDERA APPLIED MACHINE LEARNING PROTOTYPE (AMP) # (C) Cloudera, Inc. 2020 # All rights reserved. # # Applicable Open Source License: Apache 2.0 # # NOTE: Cloudera open source products are modular software products # made up of hun...
33.581818
77
0.690309
# ########################################################################### # # CLOUDERA APPLIED MACHINE LEARNING PROTOTYPE (AMP) # (C) Cloudera, Inc. 2020 # All rights reserved. # # Applicable Open Source License: Apache 2.0 # # NOTE: Cloudera open source products are modular software products # made up of hun...
6
0
0
0
0
785
0
11
317
7ca28bd7ed1737db978d8839238913c0212c4ba4
2,340
py
Python
databuilder/extractor/db_api_extractor.py
sauravsrijan/amundsendatabuilder
3e78a5dff61b8e214157b5fc4f78cb397e4845b3
[ "Apache-2.0" ]
null
null
null
databuilder/extractor/db_api_extractor.py
sauravsrijan/amundsendatabuilder
3e78a5dff61b8e214157b5fc4f78cb397e4845b3
[ "Apache-2.0" ]
null
null
null
databuilder/extractor/db_api_extractor.py
sauravsrijan/amundsendatabuilder
3e78a5dff61b8e214157b5fc4f78cb397e4845b3
[ "Apache-2.0" ]
null
null
null
import logging LOGGER = logging.getLogger(__name__)
27.209302
90
0.585043
import importlib import logging from typing import Iterable, Any # noqa: F401 from pyhocon import ConfigTree # noqa: F401 from databuilder.extractor.base_extractor import Extractor LOGGER = logging.getLogger(__name__) class DBAPIExtractor(Extractor): """ Generic DB API extractor. """ CONNECTION_...
0
0
0
2,092
0
0
0
52
141
40b08a1e29765b08e0bd1beaf989e491652080d9
5,959
py
Python
pmap/small_ising_scoring.py
vicariousinc/perturb_and_max_product
5d781e5ab33ceda621d1f014fdfe8d50e68016c1
[ "MIT" ]
3
2021-11-09T06:54:01.000Z
2022-03-14T13:06:32.000Z
pmap/small_ising_scoring.py
vicariousinc/perturb_and_max_product
5d781e5ab33ceda621d1f014fdfe8d50e68016c1
[ "MIT" ]
null
null
null
pmap/small_ising_scoring.py
vicariousinc/perturb_and_max_product
5d781e5ab33ceda621d1f014fdfe8d50e68016c1
[ "MIT" ]
2
2022-03-12T11:35:10.000Z
2022-03-19T10:43:22.000Z
# Utils for small Ising models from jax.config import config config.update("jax_disable_jit", False) """ Note: in our experiments we consider two classes of Ising models: - models with observations in {0, 1} and energy E1(x) = -0.5 * x.T * W * x - x.T * b, as this is traditionally the case - models with observatio...
32.922652
104
0.603793
# Utils for small Ising models from itertools import product import numpy as np from jax import jit from jax import random from jax.config import config from jax.scipy.special import logsumexp from tqdm import tqdm config.update("jax_disable_jit", False) """ Note: in our experiments we consider two classes of Ising ...
0
395
0
0
0
4,431
0
22
317
8f557c9c6d3dfd66d747b2dc5dfac26c83084f0a
693
py
Python
remcall/schema/base.py
luphord/remcall
31419ff0f5c21ea2d90f9cabdaec85b6eebcaa12
[ "MIT" ]
null
null
null
remcall/schema/base.py
luphord/remcall
31419ff0f5c21ea2d90f9cabdaec85b6eebcaa12
[ "MIT" ]
null
null
null
remcall/schema/base.py
luphord/remcall
31419ff0f5c21ea2d90f9cabdaec85b6eebcaa12
[ "MIT" ]
null
null
null
NAME_CHARS = set('ABCDEFGHIJKLMNOPQRSTUVWXYZ' + 'abcdefghijklmnopqrstuvwxyz0123456789') NAME_FIRST_CHARS = set('ABCDEFGHIJKLMNOPQRSTUVWXYZ' + 'abcdefghijklmnopqrstuvwxyz')
43.3125
77
0.621934
NAME_CHARS = set('ABCDEFGHIJKLMNOPQRSTUVWXYZ' + 'abcdefghijklmnopqrstuvwxyz0123456789') NAME_FIRST_CHARS = set('ABCDEFGHIJKLMNOPQRSTUVWXYZ' + 'abcdefghijklmnopqrstuvwxyz') def assert_name(name: str): assert len(name) > 0, ('A name has to contain at least one character, ' + ...
0
0
0
0
0
457
0
0
23
a8a5bca9249bed381200aa37264b3bcd0d65434a
1,677
py
Python
src/setup.py
antonsmislevics/safe-env
8727bda0b3a0010f0653dbfe824910ac69e27007
[ "MIT" ]
null
null
null
src/setup.py
antonsmislevics/safe-env
8727bda0b3a0010f0653dbfe824910ac69e27007
[ "MIT" ]
null
null
null
src/setup.py
antonsmislevics/safe-env
8727bda0b3a0010f0653dbfe824910ac69e27007
[ "MIT" ]
null
null
null
import setuptools import re long_description = "" # with open("README.md", "r") as fh: # long_description = fh.read() version = re.search( r"^__version__\s*?=\s*?'(.*)'", open('safe_env/version.py').read(), re.M ).group(1) requires_base = load_requirements_from_file("requirements-base.txt") requi...
30.490909
79
0.645796
import setuptools import re def load_requirements_from_file(file_name): # get the dependencies and installs requires = [] with open(file_name, "r", encoding="utf-8") as f: # Make sure we strip all comments and options (e.g "--extra-index-url") for line in f: req = line.split("#"...
0
0
0
0
0
391
0
0
23
265de00e591a9bd468fdb61184d5fc5df5b88691
4,049
py
Python
tests/unit_tests/test_responsebot.py
openjusticebaltimore/ResponseBot
e224fe5251190f2f4a8901afbd622c411601e86e
[ "Apache-2.0" ]
16
2016-05-11T00:04:18.000Z
2020-07-21T20:32:11.000Z
tests/unit_tests/test_responsebot.py
openjusticebaltimore/ResponseBot
e224fe5251190f2f4a8901afbd622c411601e86e
[ "Apache-2.0" ]
6
2016-05-10T03:34:17.000Z
2016-06-14T02:42:45.000Z
tests/unit_tests/test_responsebot.py
openjusticebaltimore/ResponseBot
e224fe5251190f2f4a8901afbd622c411601e86e
[ "Apache-2.0" ]
6
2016-05-09T20:17:43.000Z
2020-08-15T04:43:45.000Z
try: from mock import patch, MagicMock except ImportError:
49.987654
113
0.674241
from unittest.case import TestCase from tweepy.error import TweepError from responsebot.common.exceptions import MissingConfigError, APIQuotaError, AuthenticationError try: from mock import patch, MagicMock except ImportError: from unittest.mock import patch, MagicMock from responsebot.responsebot import Re...
0
2,516
0
1,179
0
0
0
149
140
289059a368c618c03bdc37e2a9f2a8891b92b9d9
19,901
py
Python
packages/w3af/w3af/core/ui/gui/profiles.py
ZooAtmosphereGroup/HelloPackages
0ccffd33bf927b13d28c8f715ed35004c33465d9
[ "Apache-2.0" ]
3
2019-04-09T22:59:33.000Z
2019-06-14T09:23:24.000Z
tools/w3af/w3af/core/ui/gui/profiles.py
sravani-m/Web-Application-Security-Framework
d9f71538f5cba6fe1d8eabcb26c557565472f6a6
[ "MIT" ]
null
null
null
tools/w3af/w3af/core/ui/gui/profiles.py
sravani-m/Web-Application-Security-Framework
d9f71538f5cba6fe1d8eabcb26c557565472f6a6
[ "MIT" ]
null
null
null
""" profiles.py Copyright 2007 Andres Riancho This file is part of w3af, http://w3af.org/ . w3af is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation version 2 of the License. w3af is distributed in the hope that it...
36.785582
94
0.581076
""" profiles.py Copyright 2007 Andres Riancho This file is part of w3af, http://w3af.org/ . w3af is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation version 2 of the License. w3af is distributed in the hope that it...
0
0
0
18,973
0
0
0
48
112
b21b40eeb46b85198637ae6c755f4556a994813a
1,586
py
Python
src/app/models.py
aminul91/linktutor_restapi
2077119f9771b31e2aa49f914ebd76451fe3b53c
[ "MIT" ]
null
null
null
src/app/models.py
aminul91/linktutor_restapi
2077119f9771b31e2aa49f914ebd76451fe3b53c
[ "MIT" ]
null
null
null
src/app/models.py
aminul91/linktutor_restapi
2077119f9771b31e2aa49f914ebd76451fe3b53c
[ "MIT" ]
null
null
null
# Create your models here.
38.682927
80
0.747793
from django.db import models # Create your models here. class user_infos(models.Model): user_name = models.CharField(max_length=50,default="") pass_user = models.CharField(max_length=50,default="") user_email = models.EmailField() def __str__(self): return self.user_name class tutorial_types(m...
0
0
0
1,411
0
0
0
7
139
d08715c0ef4c3ec409e4da9558407c2e6e2f25ee
503
py
Python
EasyGit/controllers/navigation.py
andreyragimov/EasyGit
96d92eeeffab21222887846c77e78eb804223e5d
[ "MIT" ]
null
null
null
EasyGit/controllers/navigation.py
andreyragimov/EasyGit
96d92eeeffab21222887846c77e78eb804223e5d
[ "MIT" ]
null
null
null
EasyGit/controllers/navigation.py
andreyragimov/EasyGit
96d92eeeffab21222887846c77e78eb804223e5d
[ "MIT" ]
null
null
null
#!/usr/bin/python3 # -*- coding: utf-8 -*- from PyQt5.QtWebKitWidgets import QWebView view = QWebView() frame = view.page().mainFrame() # todo check is it changing
20.958333
60
0.630219
#!/usr/bin/python3 # -*- coding: utf-8 -*- from PyQt5.QtCore import QObject, pyqtSlot, QUrl from PyQt5.QtWebKitWidgets import QWebView view = QWebView() frame = view.page().mainFrame() # todo check is it changing class Loader(QObject): def __init__(self): QObject.__init__(self) @pyqtSlot(str) ...
0
152
0
110
0
0
0
27
46
c108fd3d6022fdbe9c9fd301bea4c7bc30dc146e
619
py
Python
csv/jython/read/csv_read.py
ekzemplaro/data_base_language
e77030367ffc595f1fac8583f03f9a3ce5eb1611
[ "MIT", "Unlicense" ]
3
2015-05-12T16:44:27.000Z
2021-02-09T00:39:24.000Z
csv/jython/read/csv_read.py
ekzemplaro/data_base_language
e77030367ffc595f1fac8583f03f9a3ce5eb1611
[ "MIT", "Unlicense" ]
null
null
null
csv/jython/read/csv_read.py
ekzemplaro/data_base_language
e77030367ffc595f1fac8583f03f9a3ce5eb1611
[ "MIT", "Unlicense" ]
null
null
null
#! /usr/bin/jython # -*- coding: utf-8 -*- # # csv_read.py # # Jul/20/2015 # import sys import string # sys.path.append ('/var/www/data_base/common/python_common') sys.path.append ('/var/www/data_base/common/jython_common') from jython_text_manipulate import csv_read_proc from text_manipulate import dict_display_p...
23.807692
70
0.547658
#! /usr/bin/jython # -*- coding: utf-8 -*- # # csv_read.py # # Jul/20/2015 # import sys import string # sys.path.append ('/var/www/data_base/common/python_common') sys.path.append ('/var/www/data_base/common/jython_common') from jython_text_manipulate import csv_read_proc from text_manipulate import dict_display_p...
12
0
0
0
0
0
0
0
0
5107d647882f810d0bdeb3763081762daca8e9bb
541
py
Python
setup.py
serranoycandela/huiini_client
1c5f828634dabc9a951d542b0b4f328566fabf30
[ "MIT" ]
null
null
null
setup.py
serranoycandela/huiini_client
1c5f828634dabc9a951d542b0b4f328566fabf30
[ "MIT" ]
21
2018-11-19T23:08:29.000Z
2018-11-22T16:07:01.000Z
setup.py
serranoycandela/huiini_client
1c5f828634dabc9a951d542b0b4f328566fabf30
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from distutils.core import setup import sys sys.argv.append('py2exe') #C:\Python34\python.exe setup.py setup( windows=[ { "script": "huiini.py", "icon_resources": [(1, "myicon.ico")] } ], options={ "py2exe"...
21.64
98
0.432532
# -*- coding: utf-8 -*- from distutils.core import setup import py2exe, sys sys.argv.append('py2exe') #C:\Python34\python.exe setup.py setup( windows=[ { "script": "huiini.py", "icon_resources": [(1, "myicon.ico")] } ], options={ ...
0
0
0
0
0
0
0
8
0
01bbb52d526d294f328f4ebe24d0eb6d13b4a9ac
8,595
py
Python
src/covid_scrape.py
wcbeard/covid_models
16c732273f715045aea150f94717229e54bf5b50
[ "MIT" ]
null
null
null
src/covid_scrape.py
wcbeard/covid_models
16c732273f715045aea150f94717229e54bf5b50
[ "MIT" ]
null
null
null
src/covid_scrape.py
wcbeard/covid_models
16c732273f715045aea150f94717229e54bf5b50
[ "MIT" ]
null
null
null
import itertools as it from pathlib import Path import simplejson import altair.vegalite.v3 as A import requests import pandas as pd import numpy as np pth = Path("~/repos/covid/data").expanduser() url_ga_county = url_ga = "https://dph.georgia.gov/covid-19-daily-status-report" # Utils def nonull_tdd(s): """ ...
23.612637
79
0.575334
import datetime as dt import itertools as it from pathlib import Path import re import simplejson import altair.vegalite.v3 as A from bs4 import BeautifulSoup import requests import pandas as pd import numpy as np pth = Path("~/repos/covid/data").expanduser() url_ga_county = url_ga = "https://dph.georgia.gov/covid-19...
0
0
0
0
0
4,281
0
-4
545
398552cdef48af00a29f3aaad7dc0559249ffd7f
27,158
py
Python
npl/likelihood_functions.py
laravomfell/tvd_loss
b30a925f95985a03ff70bfa40a6ec3662432779d
[ "MIT" ]
1
2021-07-21T14:56:59.000Z
2021-07-21T14:56:59.000Z
npl/likelihood_functions.py
laravomfell/tvd_loss
b30a925f95985a03ff70bfa40a6ec3662432779d
[ "MIT" ]
null
null
null
npl/likelihood_functions.py
laravomfell/tvd_loss
b30a925f95985a03ff70bfa40a6ec3662432779d
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Fri Aug 14 09:35:37 2020 @author: Jeremias Knoblauch and Lara Vomfell Description: Likelihood function wrappers for use within NPL class """ import torch # set the seeds and make sure computations are reproducible torch.manual_seed(0) ...
37.771905
108
0.559062
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Fri Aug 14 09:35:37 2020 @author: Jeremias Knoblauch and Lara Vomfell Description: Likelihood function wrappers for use within NPL class """ import numpy as np import pdb from scipy.stats import poisson, norm, binom from scipy.optimize import minimize im...
2
0
0
26,333
0
0
0
70
413
57629d8608d7585637c3a45074580991baa03cb1
1,105
py
Python
networking/main.py
fred5229/IOT
9fa6d5346476b35baf09337ffa04b2b1fb03f69c
[ "MIT" ]
null
null
null
networking/main.py
fred5229/IOT
9fa6d5346476b35baf09337ffa04b2b1fb03f69c
[ "MIT" ]
null
null
null
networking/main.py
fred5229/IOT
9fa6d5346476b35baf09337ffa04b2b1fb03f69c
[ "MIT" ]
null
null
null
import machine from network import WLAN from mqtt import MQTTClient # Grapped from https://github.com/pycom/pycom-libraries/blob/master/examples/mqtt/mqtt.py # Add to your /lib folder and upload import pycom pycom.heartbeat(False) # disable the heartbeat LED # Configuration variables WIFI...
32.5
117
0.739367
import time import machine from network import WLAN from mqtt import MQTTClient # Grapped from https://github.com/pycom/pycom-libraries/blob/master/examples/mqtt/mqtt.py # Add to your /lib folder and upload import pycom pycom.heartbeat(False) # disable the heartbeat LED # Configuration va...
0
0
0
0
0
0
0
-10
22
6d2835fc66c2e0355f29b5dfc5de50d338ce23d4
763
py
Python
class3/exercises/exercise2/exercise2.py
EndlessDynamics/Fork_nornir_course
04bf7e3819659f481a4e04059152877b795177b2
[ "Apache-2.0" ]
60
2019-05-11T05:23:10.000Z
2022-03-30T08:03:43.000Z
class3/exercises/exercise2/exercise2.py
EndlessDynamics/Fork_nornir_course
04bf7e3819659f481a4e04059152877b795177b2
[ "Apache-2.0" ]
14
2021-03-31T19:08:08.000Z
2021-09-15T17:29:40.000Z
class3/exercises/exercise2/exercise2.py
EndlessDynamics/Fork_nornir_course
04bf7e3819659f481a4e04059152877b795177b2
[ "Apache-2.0" ]
21
2019-08-08T21:30:46.000Z
2022-03-28T06:22:25.000Z
if __name__ == "__main__": main()
21.8
54
0.614679
from nornir import InitNornir from nornir.core.filter import F def main(): nr = InitNornir() # Exercise 2a print("\nExercise 2a") print("-" * 20) arista1 = nr.filter(name="arista1") print(arista1.inventory.hosts) print("-" * 20) print("\nExercise 2b") print("-" * 20) wan_devs...
0
0
0
0
0
636
0
19
67
50927bf55bb6ed949cd938f236ba1859e3cc4a4a
926
py
Python
gui/migrations/0003_auto_20210927_1857.py
blakejakopovic/lndg
45506b55ed6c2f554ef3c13a6863e75ebb292f07
[ "MIT" ]
56
2021-09-11T14:56:33.000Z
2022-03-31T04:52:18.000Z
gui/migrations/0003_auto_20210927_1857.py
SatoshiNakamotoBitcoin/lndg
41d3acb8e87c6f58420cc4fbef114bb802a7ad85
[ "MIT" ]
37
2021-09-23T18:28:36.000Z
2022-03-30T00:35:45.000Z
gui/migrations/0003_auto_20210927_1857.py
SatoshiNakamotoBitcoin/lndg
41d3acb8e87c6f58420cc4fbef114bb802a7ad85
[ "MIT" ]
15
2021-09-30T23:48:03.000Z
2022-03-28T21:21:50.000Z
# Generated by Django 3.2.7 on 2021-09-27 18:57
25.722222
52
0.561555
# Generated by Django 3.2.7 on 2021-09-27 18:57 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('gui', '0002_auto_20210923_1538'), ] operations = [ migrations.RenameField( model_name='channels', old_name='base_fee...
0
0
0
812
0
0
0
19
46
916d5b41a3fe1c8012d32880f1a79aa5e89ea8b1
13,011
py
Python
foundation_tenant/tests/test_models_to_string.py
smegurus/smegurus-django
053973b5ff0b997c52bfaca8daf8e07db64a877c
[ "BSD-4-Clause" ]
1
2020-07-16T10:58:23.000Z
2020-07-16T10:58:23.000Z
foundation_tenant/tests/test_models_to_string.py
smegurus/smegurus-django
053973b5ff0b997c52bfaca8daf8e07db64a877c
[ "BSD-4-Clause" ]
13
2018-11-30T02:29:39.000Z
2022-03-11T23:35:49.000Z
foundation_tenant/tests/test_models_to_string.py
smegurus/smegurus-django
053973b5ff0b997c52bfaca8daf8e07db64a877c
[ "BSD-4-Clause" ]
null
null
null
TEST_USER_EMAIL = "ledo@gah.com" TEST_USER_USERNAME = "Ledo" TEST_USER_PASSWORD = "GalacticAllianceOfHumankind" TEST_USER_FIRST_NAME = "Ledo" TEST_USER_LAST_NAME = ""
33.882813
93
0.644455
from django.core import mail from django.core.signing import Signer from django.db import transaction from django.contrib.auth.models import User, Group from django.utils import translation from django.core.urlresolvers import resolve, reverse from rest_framework.test import APITestCase from django_tenants.test.cases i...
0
8,757
0
1,174
0
0
0
1,853
1,057
62d7920dc05a18824a8af528e230f5a46ec28702
2,439
py
Python
sensor_stick/scripts/segmentation.py
DrPanigrahi/RoboND-Perception-Project
5d755c4a82ef4f7e4bc99c836ae5e03dbda03dcd
[ "MIT" ]
null
null
null
sensor_stick/scripts/segmentation.py
DrPanigrahi/RoboND-Perception-Project
5d755c4a82ef4f7e4bc99c836ae5e03dbda03dcd
[ "MIT" ]
null
null
null
sensor_stick/scripts/segmentation.py
DrPanigrahi/RoboND-Perception-Project
5d755c4a82ef4f7e4bc99c836ae5e03dbda03dcd
[ "MIT" ]
null
null
null
#!/usr/bin/env python # Author(s): Smruti Panigrahi # Import modules import rospy import sensor_msgs.point_cloud2 as pc2 from sensor_msgs.msg import PointCloud2 #from pcl_helper import * import pcl_helper as pclh # TODO: Define functions as required # Callback function for your Point Cloud Subscriber if __name_...
31.675325
106
0.755228
#!/usr/bin/env python # Author(s): Smruti Panigrahi # Import modules import rospy import pcl import numpy as np import ctypes import struct import sensor_msgs.point_cloud2 as pc2 from sensor_msgs.msg import PointCloud2, PointField from std_msgs.msg import Header from random import randint #from pcl_helper import * i...
0
0
0
0
0
1,202
0
-1
176
ada378632a2467ac04bdf3b6c2d9fe593fcbd1d1
2,202
py
Python
pysoa/common/transport/http2_gateway/client.py
zetahernandez/pysoa
006e55ba877196a42c64f2ff453583d366082d55
[ "Apache-2.0" ]
null
null
null
pysoa/common/transport/http2_gateway/client.py
zetahernandez/pysoa
006e55ba877196a42c64f2ff453583d366082d55
[ "Apache-2.0" ]
null
null
null
pysoa/common/transport/http2_gateway/client.py
zetahernandez/pysoa
006e55ba877196a42c64f2ff453583d366082d55
[ "Apache-2.0" ]
null
null
null
from __future__ import ( absolute_import, unicode_literals, )
37.965517
119
0.698456
from __future__ import ( absolute_import, unicode_literals, ) import uuid from pysoa.common.metrics import TimerResolution from pysoa.common.transport.base import ( ClientTransport, ) from pysoa.common.transport.exceptions import MessageReceiveTimeout from pysoa.common.transport.http2_gateway.settings imp...
0
1,723
0
0
0
0
0
228
180
3eeb13b272956f7df0575c68e031eb841be38c5a
5,558
py
Python
code/plot_WTmap_ntwrkX.py
ParhamP/Global-Trade-Network
106d3e55fba04e72feda2844d092745ce170e55d
[ "BSD-3-Clause" ]
2
2021-08-22T10:02:08.000Z
2021-11-09T11:30:31.000Z
code/plot_WTmap_ntwrkX.py
ParhamP/Global-Trade-Network
106d3e55fba04e72feda2844d092745ce170e55d
[ "BSD-3-Clause" ]
null
null
null
code/plot_WTmap_ntwrkX.py
ParhamP/Global-Trade-Network
106d3e55fba04e72feda2844d092745ce170e55d
[ "BSD-3-Clause" ]
null
null
null
import numpy as np import networkx as nx import matplotlib.pyplot as plt import utils.plot_functions as pf import utils.data_manipulation as dm from ast import literal_eval # to evaluate what is in a string literally. flg_plot_graph_on_map = True flg_imshow_adjacency = True #LOOK UP: from VS260C Rowland Taylor L...
38.068493
143
0.677762
import pickle import numpy as np import networkx as nx import matplotlib.pyplot as plt import utils.plot_functions as pf import utils.data_manipulation as dm import utils.network_manipulation as nm from ast import literal_eval # to evaluate what is in a string literally. flg_plot_graph_on_map = True flg_imshow_adja...
0
0
0
0
0
0
0
10
44
4aba22e8b14fd539db32357e1c82e363f67f6c20
10,499
py
Python
mtp_2D_7l/randomsurface/randomSurface.py
chinchay/graphene-oxide
6da0cc8eb951415e71e8c169f868ee9141186c2e
[ "MIT" ]
null
null
null
mtp_2D_7l/randomsurface/randomSurface.py
chinchay/graphene-oxide
6da0cc8eb951415e71e8c169f868ee9141186c2e
[ "MIT" ]
null
null
null
mtp_2D_7l/randomsurface/randomSurface.py
chinchay/graphene-oxide
6da0cc8eb951415e71e8c169f868ee9141186c2e
[ "MIT" ]
null
null
null
#%% import importlib import aseAtoms2cfg import myread importlib.reload(aseAtoms2cfg) importlib.reload(myread) from random import random # seed random number generator # atoms = getMirrorChain(deg, cc_dist) # # # atoms = mirrorChain(ixshift, deg, shift, cc_dist) # def mirrorChain(deg, shift, cc_dist): # # atoms...
30.431884
154
0.549481
#%% import importlib from numpy.core.fromnumeric import transpose import aseAtoms2cfg import myread importlib.reload(aseAtoms2cfg) importlib.reload(myread) import copy from random import random import numpy as np # seed random number generator from aseAtoms2cfg import atoms2cfg from ase.build import graphene_nanoribb...
0
0
0
0
0
8,348
0
55
357
8623085c6c201a6aef5194e8d05dbb61a551f5e4
875
py
Python
waybar-watson.py
joshmuente/waybar-watson
ede88e1c710b0b90b41789e04232beca84d54869
[ "MIT" ]
null
null
null
waybar-watson.py
joshmuente/waybar-watson
ede88e1c710b0b90b41789e04232beca84d54869
[ "MIT" ]
null
null
null
waybar-watson.py
joshmuente/waybar-watson
ede88e1c710b0b90b41789e04232beca84d54869
[ "MIT" ]
1
2022-01-13T15:51:05.000Z
2022-01-13T15:51:05.000Z
#!/usr/bin/env python3 if __name__ == "__main__": main()
32.407407
96
0.558857
#!/usr/bin/env python3 import watson import time import json import arrow import datetime def main(): while True: wat = watson.Watson() if wat.is_started: project = wat.current.get('project') tags = wat.current.get('tags') started = arrow.now() - wat.current.get(...
0
0
0
0
0
723
0
-43
133
8a1fcff5a1562e98511787ec3b0bda6b27b718a0
12,093
py
Python
verejne/api_GetInfos.py
mirecmrozek/verejne.digital
8aed7311d75b6d15c8c4b5bbbf0d15ade3ce031a
[ "Apache-2.0" ]
null
null
null
verejne/api_GetInfos.py
mirecmrozek/verejne.digital
8aed7311d75b6d15c8c4b5bbbf0d15ade3ce031a
[ "Apache-2.0" ]
null
null
null
verejne/api_GetInfos.py
mirecmrozek/verejne.digital
8aed7311d75b6d15c8c4b5bbbf0d15ade3ce031a
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- import datetime # --- UTILITY METHODS --- def _convert_dates_to_strings(row): """ Given a database row returned by psycopg2, convert all dates to strings (usually used to ensure JSON serialisability). """ for key in row: if type(row[key]) =...
31.329016
125
0.566691
#!/usr/bin/env python # -*- coding: utf-8 -*- import datetime # --- UTILITY METHODS --- def _convert_dates_to_strings(row): """ Given a database row returned by psycopg2, convert all dates to strings (usually used to ensure JSON serialisability). """ for key in row: if type(row[key]) =...
0
0
0
0
0
10,473
0
0
320
f35e086725dbbf1b045cca1de6228fbbc4d21154
97
py
Python
sygicmaps/__init__.py
Sygic/sygic-maps-services-python
3a2971dbfe0f68d6d2908478247d92367f4f531d
[ "MIT" ]
2
2017-10-23T08:08:26.000Z
2018-02-07T12:29:30.000Z
sygicmaps/__init__.py
Sygic/sygic-maps-services-python
3a2971dbfe0f68d6d2908478247d92367f4f531d
[ "MIT" ]
1
2018-03-16T14:23:11.000Z
2018-03-21T13:09:46.000Z
sygicmaps/__init__.py
Sygic/sygic-maps-services-python
3a2971dbfe0f68d6d2908478247d92367f4f531d
[ "MIT" ]
1
2019-06-13T08:20:30.000Z
2019-06-13T08:20:30.000Z
__version__ = "0.2.7-dev"
19.4
35
0.793814
from sygicmaps.client import Client from sygicmaps.input import Input __version__ = "0.2.7-dev"
0
0
0
0
0
0
0
26
44
2e04004221b85f008ff5c2de8f52ace3e881949d
679
py
Python
examples/eval_model.py
markr-fu-berlin/ParlAI
23f014c38ee502091fdd8623f5c8a6f2c3216e92
[ "BSD-3-Clause" ]
2
2020-03-22T10:18:09.000Z
2020-05-06T21:48:47.000Z
examples/eval_model.py
urvishdesai/dialogue-encoding-tasks-parlai
29743cc7b47c413c2181f68c0b7ef40a6f06a40f
[ "BSD-3-Clause" ]
null
null
null
examples/eval_model.py
urvishdesai/dialogue-encoding-tasks-parlai
29743cc7b47c413c2181f68c0b7ef40a6f06a40f
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. An additional grant # of patent rights can be found in the PATENTS file in the same directory. """...
33.95
77
0.765832
#!/usr/bin/env python3 # Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. An additional grant # of patent rights can be found in the PATENTS file in the same directory. """...
0
0
0
0
0
0
0
0
0
6b0ac29059d70fa19dac6fa7c35e8c5c0152e982
52,238
py
Python
utils/BaiduTextApi/config/config.py
haodaohong/zimt8
41c1a8493775002b8a29075125b362991035cfe8
[ "Apache-2.0" ]
1
2021-09-30T05:46:44.000Z
2021-09-30T05:46:44.000Z
utils/BaiduTextApi/config/config.py
haodaohong/zimt8
41c1a8493775002b8a29075125b362991035cfe8
[ "Apache-2.0" ]
null
null
null
utils/BaiduTextApi/config/config.py
haodaohong/zimt8
41c1a8493775002b8a29075125b362991035cfe8
[ "Apache-2.0" ]
1
2021-09-24T15:46:39.000Z
2021-09-24T15:46:39.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # @Time : 2019/2/13 08:58 # @User : zhunishengrikuaile # @File : config.py # @Email : binary@shujian.org # @MyBlog : WWW.SHUJIAN.ORG # @NetName : # @Software: Api # ''' ID: 14348843 API_KEY: wc68dHtiY9mwuD7980EXr1I2 SECRET_KEY: dCaMG095LvB9pdtRqbn5eWP4RFSLnj7...
62.410992
279
0.539933
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # @Time : 2019/2/13 08:58 # @User : zhunishengrikuaile # @File : config.py # @Email : binary@shujian.org # @MyBlog : WWW.SHUJIAN.ORG # @NetName : 書劍 # @Software: 百度识图Api封装 # 配置文件 ''' 应用ID: 14348843 应用API_KEY: wc68dHtiY9mwuD7980EXr1I2 应用SECRET_KEY: dCaMG095LvB9p...
41,193
0
0
0
0
0
0
0
0
de6c10906f31d374b65912f5233777fb3ecfd68c
1,468
py
Python
rivers2stratigraphy/geom.py
amoodie/rivers2stratigraphy
3978f0ea4bd087332ee0215f5a003d7f63152598
[ "MIT" ]
3
2018-04-13T19:17:14.000Z
2018-04-26T04:36:54.000Z
rivers2stratigraphy/geom.py
amoodie/rivers2stratigraphy
3978f0ea4bd087332ee0215f5a003d7f63152598
[ "MIT" ]
13
2018-03-01T03:56:41.000Z
2018-09-24T16:27:53.000Z
rivers2stratigraphy/geom.py
amoodie/rivers2stratigraphy
3978f0ea4bd087332ee0215f5a003d7f63152598
[ "MIT" ]
null
null
null
# geometry calculations # TODO: # - swap to x^(0.5) instead of sqrt for speed? # from scipy.spatial import distance
26.690909
65
0.596049
# geometry calculations # TODO: # - swap to x^(0.5) instead of sqrt for speed? import numpy as np # from scipy.spatial import distance def Qhatfun(Qwf, D50, g): # dimensionless Qw, Wilkerson and Parker, 2011 return Qwf / (np.sqrt(g * D50) * D50**2) def Repfun(D50, R, g, nu): # particle Reynolds num, W...
0
0
0
0
0
1,113
0
-3
233
fbc6f2fca03cbeec5ed0a2f86a463517745cc994
841
py
Python
Machine learning/sentdex course/Machine learning/Classification/SVM.py
ahmedosaka/HACKER_RANK
f594fa8e1eeed0598f7151556a1068865cf9be91
[ "MIT" ]
null
null
null
Machine learning/sentdex course/Machine learning/Classification/SVM.py
ahmedosaka/HACKER_RANK
f594fa8e1eeed0598f7151556a1068865cf9be91
[ "MIT" ]
null
null
null
Machine learning/sentdex course/Machine learning/Classification/SVM.py
ahmedosaka/HACKER_RANK
f594fa8e1eeed0598f7151556a1068865cf9be91
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Wed Apr 28 20:46:54 2021 @author: ahmed """ import numpy as np from sklearn import svm from sklearn.model_selection import train_test_split import pandas as pd df = pd.read_csv('breast-cancer-wisconsin.txt') df.replace('?',-99999, inplace=True) df.drop(['id'], 1, inplace=True) ...
25.484848
72
0.707491
# -*- coding: utf-8 -*- """ Created on Wed Apr 28 20:46:54 2021 @author: ahmed """ import numpy as np from sklearn import preprocessing, neighbors, svm from sklearn.model_selection import train_test_split import pandas as pd df = pd.read_csv('breast-cancer-wisconsin.txt') df.replace('?',-99999, inplace=True) df.drop...
0
0
0
0
0
0
0
26
0