hexsha stringlengths 40 40 | size int64 7 1.04M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 247 | max_stars_repo_name stringlengths 4 125 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 368k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 4 247 | max_issues_repo_name stringlengths 4 125 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 4 247 | max_forks_repo_name stringlengths 4 125 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 1 1.04M | avg_line_length float64 1.77 618k | max_line_length int64 1 1.02M | alphanum_fraction float64 0 1 | original_content stringlengths 7 1.04M | filtered:remove_function_no_docstring int64 -102 942k | filtered:remove_class_no_docstring int64 -354 977k | filtered:remove_delete_markers int64 0 60.1k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
d2c24f0424cd286a6ffc0db161ee067b57b0c8d6 | 1,617 | py | Python | ANLY-501-INTRO/LAB11/LUNA-EX/LUNA-COLOR-EXAMPLE.py | rexarski/ggtown-ds | 00bbb26e28b4431cf4aeff68ea0b3b9220af0b1f | [
"MIT"
] | null | null | null | ANLY-501-INTRO/LAB11/LUNA-EX/LUNA-COLOR-EXAMPLE.py | rexarski/ggtown-ds | 00bbb26e28b4431cf4aeff68ea0b3b9220af0b1f | [
"MIT"
] | null | null | null | ANLY-501-INTRO/LAB11/LUNA-EX/LUNA-COLOR-EXAMPLE.py | rexarski/ggtown-ds | 00bbb26e28b4431cf4aeff68ea0b3b9220af0b1f | [
"MIT"
] | null | null | null |
import numpy as np
import matplotlib.pyplot as plt
#LOAD IMAGE
name='luna-1.jpeg'
x=plt.imread(name)
#ROTATE BY SWITCHING X AND Y DIMENSIONS
if(name=="luna-2.jpeg"):
plt.imshow(x); plt.show()
x=np.transpose(x,axes=[1,0,2])
#SHOW IMAGE
plt.imshow(x); plt.show()
#QUICK INFO ON IMAGE
get_info(x)
#CROP
pl... | 25.666667 | 91 | 0.6376 |
import numpy as np
import matplotlib.pyplot as plt
#LOAD IMAGE
name='luna-1.jpeg'
x=plt.imread(name)
#ROTATE BY SWITCHING X AND Y DIMENSIONS
if(name=="luna-2.jpeg"):
plt.imshow(x); plt.show()
x=np.transpose(x,axes=[1,0,2])
#SHOW IMAGE
plt.imshow(x); plt.show()
#QUICK INFO ON IMAGE
def get_info(image):
... | 796 | 0 | 44 |
545531c914d13d6608126fcfcf4e1138544ff3cf | 4,072 | py | Python | jojo/config.py | spiarh/jojo | 074ec90b216341a1fac5252ebfc7e3f7e2864b4c | [
"MIT"
] | null | null | null | jojo/config.py | spiarh/jojo | 074ec90b216341a1fac5252ebfc7e3f7e2864b4c | [
"MIT"
] | null | null | null | jojo/config.py | spiarh/jojo | 074ec90b216341a1fac5252ebfc7e3f7e2864b4c | [
"MIT"
] | null | null | null | import dataclasses
import enum
import os
import typing
import dacite
# import jsonschema
import yaml
import default
import util
@dataclasses.dataclass
@dataclasses.dataclass
@dataclasses.dataclass
@dataclasses.dataclass
@dataclasses.dataclass
@dataclasses.dataclass
class EnumValueYamlDumper(yaml.SafeD... | 23.674419 | 69 | 0.636542 | import dataclasses
import enum
import os
import typing
import dacite
# import jsonschema
import yaml
import default
import util
class SourceType(enum.Enum):
ALPINE = 'alpine'
GITHUB = 'github'
class TagType(enum.Enum):
TAG = 'TAG'
VERSION = 'VERSION'
VERSION_DATE = 'VERSION_DATE'
VERSION_G... | 1,261 | 1,250 | 204 |
74afefa04cc7df25c1b25de83ee4608b9424deb8 | 655 | py | Python | app/content/models.py | prapeller/blackemployer_api | ae9232773e6e164b22ffccf0b39dd9a4c2a036cf | [
"MIT"
] | null | null | null | app/content/models.py | prapeller/blackemployer_api | ae9232773e6e164b22ffccf0b39dd9a4c2a036cf | [
"MIT"
] | null | null | null | app/content/models.py | prapeller/blackemployer_api | ae9232773e6e164b22ffccf0b39dd9a4c2a036cf | [
"MIT"
] | null | null | null | from django.contrib.auth import get_user_model
from django.contrib.postgres.fields import ArrayField
from django.core.validators import FileExtensionValidator
from django.db import models
from utils.model_utils import PathAndRename, default_1d_array
from utils.slug import slugify
| 34.473684 | 87 | 0.78626 | from django.contrib.auth import get_user_model
from django.contrib.postgres.fields import ArrayField
from django.core.validators import FileExtensionValidator
from django.db import models
from utils.model_utils import PathAndRename, default_1d_array
from utils.slug import slugify
class Tag(models.Model):
title = ... | 50 | 277 | 46 |
c333af008a70efe685499e098831d999a4dddc55 | 1,025 | py | Python | module/Modeling/UV.py | minoue/rush | 7ef722a5eb85b532c3aa992ac122349be5e88241 | [
"MIT"
] | 55 | 2017-04-25T18:57:11.000Z | 2022-01-10T15:31:25.000Z | module/Modeling/UV.py | minoue/miExecutor | 7ef722a5eb85b532c3aa992ac122349be5e88241 | [
"MIT"
] | 2 | 2019-06-15T09:16:00.000Z | 2021-10-05T09:46:03.000Z | module/Modeling/UV.py | minoue/miExecutor | 7ef722a5eb85b532c3aa992ac122349be5e88241 | [
"MIT"
] | 10 | 2018-02-07T04:20:11.000Z | 2021-08-17T11:06:06.000Z | from maya import cmds
from maya import mel
commandDict = {}
commandDict['uvTextureEditor'] = "textureEditor.png"
commandDict['uVSetEditor'] = "sphere.png"
commandDict['uvProjection_automatic'] = "polyAutoProj.png"
commandDict['uvProjection_automatic_options'] = "polyAutoProj.png"
commandDict['bestPlaneTextur... | 23.837209 | 87 | 0.76 | from maya import cmds
from maya import mel
commandDict = {}
def uvTextureEditor():
cmds.TextureViewWindow()
def uVSetEditor():
cmds.UVSetEditor()
def uvProjection_automatic():
mel.eval("performPolyAutoProj 0")
def uvProjection_automatic_options():
mel.eval("performPolyAutoProj 1")
def bestPl... | 381 | 0 | 161 |
27529f90fbc906fded5c5849bb0942faff9a5f51 | 33 | py | Python | helloWorld/helloWorld.py | NaebIis/Python | 2b10a7c59abf3618695331525d0bc812845ae40f | [
"MIT"
] | null | null | null | helloWorld/helloWorld.py | NaebIis/Python | 2b10a7c59abf3618695331525d0bc812845ae40f | [
"MIT"
] | null | null | null | helloWorld/helloWorld.py | NaebIis/Python | 2b10a7c59abf3618695331525d0bc812845ae40f | [
"MIT"
] | null | null | null | msg = ('Hello World')
print(msg) | 11 | 21 | 0.636364 | msg = ('Hello World')
print(msg) | 0 | 0 | 0 |
4f6957bc6dab7937b679195f8b9ea84f0f309483 | 7,825 | py | Python | examples/7-streamlit-dataview-master/app.py | Zen-Reportz/ZenPublish | 6e3587fecfbe436e03b410c83d2e7e385d8c8877 | [
"Apache-2.0"
] | 30 | 2021-12-25T15:39:42.000Z | 2022-02-25T04:53:44.000Z | examples/7-streamlit-dataview-master/app.py | Zen-Reportz/ZenPublish | 6e3587fecfbe436e03b410c83d2e7e385d8c8877 | [
"Apache-2.0"
] | 11 | 2022-01-02T22:10:07.000Z | 2022-02-02T00:56:33.000Z | examples/7-streamlit-dataview-master/app.py | Zen-Reportz/ZenPublish | 6e3587fecfbe436e03b410c83d2e7e385d8c8877 | [
"Apache-2.0"
] | 2 | 2022-01-27T13:22:46.000Z | 2022-01-30T05:01:59.000Z | import streamlit as st
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import requests, os
from gwpy.timeseries import TimeSeries
from gwosc.locate import get_urls
from gwosc import datasets
from gwosc.api import fetch_event_json
from copy import deepcopy
import base64
# Use the non-interactiv... | 33.440171 | 180 | 0.689329 | import streamlit as st
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import requests, os
from gwpy.timeseries import TimeSeries
from gwosc.locate import get_urls
from gwosc import datasets
from gwosc.api import fetch_event_json
from copy import deepcopy
import base64
# Use the non-interactiv... | 100 | 0 | 22 |
f29ad1038b5a75e616ab5892a2a1ec5f31ccb71b | 825 | py | Python | scripts/state_wise_crop_success.py | Shreya869/minor-pro | 06e30e70023c25b264d887820ad5aeec2a6ebb51 | [
"MIT"
] | 31 | 2018-12-01T17:06:07.000Z | 2022-02-15T13:23:14.000Z | scripts/state_wise_crop_success.py | Shreya869/minor-pro | 06e30e70023c25b264d887820ad5aeec2a6ebb51 | [
"MIT"
] | 1 | 2021-12-24T13:22:23.000Z | 2021-12-24T13:23:57.000Z | scripts/state_wise_crop_success.py | Shreya869/minor-pro | 06e30e70023c25b264d887820ad5aeec2a6ebb51 | [
"MIT"
] | 13 | 2020-08-14T05:19:38.000Z | 2022-01-18T13:55:15.000Z | import pandas as pa
import numpy as np
import matplotlib.pyplot as plt
from sklearn.preprocessing import Imputer,LabelEncoder,OneHotEncoder
from sklearn.model_selection import train_test_split
from sklearn.linear_model import LinearRegression
from sklearn.model_selection import cross_val_score
#%%
datset=pa.read_cs... | 31.730769 | 92 | 0.734545 | import pandas as pa
import numpy as np
import matplotlib.pyplot as plt
from sklearn.preprocessing import Imputer,LabelEncoder,OneHotEncoder
from sklearn.model_selection import train_test_split
from sklearn.linear_model import LinearRegression
from sklearn.model_selection import cross_val_score
#%%
datset=pa.read_cs... | 0 | 0 | 0 |
823d5d669c58f480aa5ea4fabe590153f69328f2 | 8,834 | py | Python | python/mm/path_inference_private/plot_em_final.py | tjhunter/phd-thesis-tjhunter | 8238e156b5dba9940bdda2a46cfffb62699f364d | [
"Apache-2.0"
] | 1 | 2018-03-25T11:36:21.000Z | 2018-03-25T11:36:21.000Z | python/mm/path_inference_private/plot_em_final.py | tjhunter/phd-thesis-tjhunter | 8238e156b5dba9940bdda2a46cfffb62699f364d | [
"Apache-2.0"
] | null | null | null | python/mm/path_inference_private/plot_em_final.py | tjhunter/phd-thesis-tjhunter | 8238e156b5dba9940bdda2a46cfffb62699f364d | [
"Apache-2.0"
] | null | null | null | import build
import numpy as np
from collections import defaultdict
import pickle
import random
random.seed = 1
from mm.path_inference_private.proj_templates import get_em_evaluation_fnames, get_evaluation_em_data_file
from mm.path_inference_private.evaluation import LEARNING_METHOD_IDX, METRIC_NAME_IDX, STRAT_NAME_ID... | 35.620968 | 281 | 0.735228 | import build
import numpy as np
from collections import defaultdict
import pickle
import random
random.seed = 1
from mm.path_inference_private.proj_templates import get_em_evaluation_fnames, get_evaluation_em_data_file
from mm.path_inference_private.evaluation import LEARNING_METHOD_IDX, METRIC_NAME_IDX, STRAT_NAME_ID... | 1,709 | 0 | 92 |
669a88b33e0812e69e6f1238498b06168e9c6430 | 9,340 | py | Python | miniversion/cv2MOT.py | absallh/A_yolov3 | 550ec41de42b8efe638e887c51a568189947e049 | [
"Apache-2.0"
] | 6 | 2019-12-30T14:26:23.000Z | 2021-09-14T04:48:20.000Z | miniversion/cv2MOT.py | absallh/A_yolov3 | 550ec41de42b8efe638e887c51a568189947e049 | [
"Apache-2.0"
] | 1 | 2020-01-13T10:44:30.000Z | 2020-12-08T10:54:10.000Z | miniversion/cv2MOT.py | absallh/A_yolov3 | 550ec41de42b8efe638e887c51a568189947e049 | [
"Apache-2.0"
] | 3 | 2020-04-01T06:10:32.000Z | 2020-10-18T05:02:16.000Z | import glob
import os
import sys
import time
from random import randint
import cv2
import numpy as np
import torch
from PIL import Image
from models import *
from utils.datasets import *
from utils.utils import *
# from utils.utils import xyxy2xywh
os.environ["CUDA_VISIBLE_DEVICES"] = "1"
trackerTypes = [
'BOOS... | 34.850746 | 77 | 0.530621 | import glob
import os
import sys
import time
from random import randint
import cv2
import numpy as np
import torch
from PIL import Image
from models import *
from utils.datasets import *
from utils.utils import *
# from utils.utils import xyxy2xywh
os.environ["CUDA_VISIBLE_DEVICES"] = "1"
trackerTypes = [
'BOOS... | 5,584 | 5 | 176 |
7c7b4d94033c18dbcaac16d22936929cb4b5ccca | 6,110 | py | Python | gan.py | chetanchougle/gan | 264d90cae43300d87d13bb42019deceae224b16d | [
"MIT"
] | 2 | 2020-12-14T03:08:22.000Z | 2020-12-14T13:49:08.000Z | gan.py | deathstar1/gan | 264d90cae43300d87d13bb42019deceae224b16d | [
"MIT"
] | null | null | null | gan.py | deathstar1/gan | 264d90cae43300d87d13bb42019deceae224b16d | [
"MIT"
] | null | null | null | import os
import numpy as np
import pandas as pd
from scipy.misc import imread
import tensorflow as tf
from six.moves import urllib
import keras
from keras.models import Sequential
from keras.layers import Dense, Flatten, Reshape, InputLayer
from keras.regularizers import L1L2
from scipy.misc import imsave
import gz... | 30.247525 | 147 | 0.727332 | import os
import numpy as np
import pandas as pd
from scipy.misc import imread
import tensorflow as tf
from six.moves import urllib
import keras
from keras.models import Sequential
from keras.layers import Dense, Flatten, Reshape, InputLayer
from keras.regularizers import L1L2
from scipy.misc import imsave
import gz... | 0 | 0 | 0 |
168a70138796ae2893583b47c8f2621ac6809a0e | 358 | py | Python | tests/acceptance/steps/running_tests.py | rlconsult/behave-django | 74041166bb106dead789eb70f88c0fee61e88dce | [
"MIT"
] | null | null | null | tests/acceptance/steps/running_tests.py | rlconsult/behave-django | 74041166bb106dead789eb70f88c0fee61e88dce | [
"MIT"
] | null | null | null | tests/acceptance/steps/running_tests.py | rlconsult/behave-django | 74041166bb106dead789eb70f88c0fee61e88dce | [
"MIT"
] | 1 | 2021-11-12T16:08:17.000Z | 2021-11-12T16:08:17.000Z | from behave import given, when, then
@given(u'this step exists')
@when(u'I run "python manage.py behave"')
@then(u'I should see the behave tests run')
@then(u'django_ready should be called')
| 16.272727 | 43 | 0.72067 | from behave import given, when, then
@given(u'this step exists')
def step_exists(context):
pass
@when(u'I run "python manage.py behave"')
def run_command(context):
pass
@then(u'I should see the behave tests run')
def is_running(context):
pass
@then(u'django_ready should be called')
def django_contex... | 71 | 0 | 88 |
70bf0d62d58477b1a9fa360e25a6c4e7f631d857 | 2,620 | py | Python | user/models.py | HumayounMustafa/moodswings | 32554acdee880b632cb9ef63c2ce37d052bc76f5 | [
"MIT"
] | null | null | null | user/models.py | HumayounMustafa/moodswings | 32554acdee880b632cb9ef63c2ce37d052bc76f5 | [
"MIT"
] | null | null | null | user/models.py | HumayounMustafa/moodswings | 32554acdee880b632cb9ef63c2ce37d052bc76f5 | [
"MIT"
] | null | null | null | from flask import Flask, jsonify, request, redirect, session, render_template, url_for
from flask_mail import Mail, Message
import uuid
from app import db, serializer, mail
from itsdangerous import URLSafeTimedSerializer, SignatureExpired
| 36.901408 | 115 | 0.595038 | from flask import Flask, jsonify, request, redirect, session, render_template, url_for
from flask_mail import Mail, Message
import uuid
from app import db, serializer, mail
from itsdangerous import URLSafeTimedSerializer, SignatureExpired
class User:
def start_session(self, user):
session['logged... | 2,152 | -10 | 228 |
d0d20743fdd39b355e497598543bd007290f251f | 840 | py | Python | src/discolight/loaders/annotation/widthheightcsv.py | denzel-datature/discolight | 7c8309d3f883263b2e4cae0b289f17be1d1c07ea | [
"MIT"
] | 27 | 2020-07-23T08:09:25.000Z | 2022-03-01T08:24:43.000Z | src/discolight/loaders/annotation/widthheightcsv.py | denzel-datature/discolight | 7c8309d3f883263b2e4cae0b289f17be1d1c07ea | [
"MIT"
] | 7 | 2020-08-05T07:26:55.000Z | 2020-12-31T04:20:40.000Z | src/discolight/loaders/annotation/widthheightcsv.py | denzel-datature/discolight | 7c8309d3f883263b2e4cae0b289f17be1d1c07ea | [
"MIT"
] | 6 | 2020-07-27T04:30:01.000Z | 2020-08-13T02:39:25.000Z | """A CSV annotation writer that reads the bbox in x, y, w, h format."""
from discolight.annotations import BoundingBox
from .types import CSVRow, CSVAnnotationLoader
class WidthHeightCSV(CSVAnnotationLoader):
"""Loads annotations from a CSV file in the following format.
image_name, x_min, y_min, width, heig... | 28.965517 | 78 | 0.633333 | """A CSV annotation writer that reads the bbox in x, y, w, h format."""
from discolight.annotations import BoundingBox
from .types import CSVRow, CSVAnnotationLoader
class WidthHeightCSV(CSVAnnotationLoader):
"""Loads annotations from a CSV file in the following format.
image_name, x_min, y_min, width, heig... | 0 | 0 | 0 |
49e3ecde9b58eb66278f7f1a1c0f0f1149f1d935 | 17,813 | py | Python | cogs/moderation.py | AtlasC0R3/drop-discord | 5f1be41d25a2717df2e1713376c08cede41d3068 | [
"Apache-2.0"
] | 4 | 2021-05-28T17:30:29.000Z | 2021-11-07T13:18:48.000Z | cogs/moderation.py | AtlasC0R3/drop-bot | 5f1be41d25a2717df2e1713376c08cede41d3068 | [
"Apache-2.0"
] | 1 | 2021-05-28T17:33:59.000Z | 2021-06-04T22:50:41.000Z | cogs/moderation.py | AtlasC0R3/drop-discord | 5f1be41d25a2717df2e1713376c08cede41d3068 | [
"Apache-2.0"
] | 3 | 2020-12-30T17:58:33.000Z | 2021-01-16T20:29:09.000Z | import asyncio
import random
import discord
import drop.errors
from discord.ext import commands
from data.extdata import get_language_str, wait_for_user, get_file_type
from drop.tempban import *
from drop.errors import *
with open("data/embed_colors.json") as f:
colors = json.load(f)
color_list = [c for c in... | 40.66895 | 117 | 0.565149 | import asyncio
import random
import discord
import drop.errors
from discord.ext import commands
from data.extdata import get_language_str, wait_for_user, get_file_type
from drop.tempban import *
from drop.errors import *
with open("data/embed_colors.json") as f:
colors = json.load(f)
color_list = [c for c in... | 14,604 | 0 | 414 |
9245b2f32aacf668eec37f087f06611c4ba6d51c | 400 | py | Python | bot/models/Sizers/DefaultSizer.py | estebanthi/BinanceTradingBotV4 | 93ccac86db9bc8612248bf5cd1bc9e359749e383 | [
"MIT"
] | 4 | 2021-11-22T13:59:11.000Z | 2022-02-10T08:27:25.000Z | bot/models/Sizers/DefaultSizer.py | estebanthi/BinanceTradingBotV4 | 93ccac86db9bc8612248bf5cd1bc9e359749e383 | [
"MIT"
] | null | null | null | bot/models/Sizers/DefaultSizer.py | estebanthi/BinanceTradingBotV4 | 93ccac86db9bc8612248bf5cd1bc9e359749e383 | [
"MIT"
] | 3 | 2021-11-15T18:49:20.000Z | 2022-02-06T19:46:29.000Z | from models.Sizers.Sizer import Sizer as Sizer
import backtrader as bt
from dataclasses import dataclass
from dataclasses import field
@dataclass
class DefaultSizer(Sizer):
"""
This is the default sizer used in Engine
It's a PercentSizer, paremetered with 10%
"""
sizer: bt.Sizer = bt.sizers.Perce... | 23.529412 | 70 | 0.735 | from models.Sizers.Sizer import Sizer as Sizer
import backtrader as bt
from dataclasses import dataclass
from dataclasses import field
@dataclass
class DefaultSizer(Sizer):
"""
This is the default sizer used in Engine
It's a PercentSizer, paremetered with 10%
"""
sizer: bt.Sizer = bt.sizers.Perce... | 0 | 0 | 0 |
9109dfb186363e370f7bb44dc7ef89ae43df2e8c | 15,318 | py | Python | duplicity_backup_s3/duplicity_s3.py | jberends/duplicity_backup | 99e27060b20dabc0ff8ed416b6a4aeac98143cae | [
"Apache-2.0"
] | 2 | 2019-12-16T10:42:16.000Z | 2021-02-24T11:43:17.000Z | duplicity_backup_s3/duplicity_s3.py | jberends/duplicity_backup | 99e27060b20dabc0ff8ed416b6a4aeac98143cae | [
"Apache-2.0"
] | null | null | null | duplicity_backup_s3/duplicity_s3.py | jberends/duplicity_backup | 99e27060b20dabc0ff8ed416b6a4aeac98143cae | [
"Apache-2.0"
] | 1 | 2020-06-30T22:57:06.000Z | 2020-06-30T22:57:06.000Z | # -*- coding: utf-8 -*-
import os
import subprocess
import sys
import warnings
from pathlib import Path
from pprint import pprint
from typing import Dict, List
import yaml
from envparse import env
from duplicity_backup_s3.defaults import (
FULL_IF_OLDER_THAN,
DUPLICITY_BACKUP_ARGS,
DUPLICITY_VERBOSITY,
... | 36.298578 | 94 | 0.591983 | # -*- coding: utf-8 -*-
import os
import subprocess
import sys
import warnings
from pathlib import Path
from pprint import pprint
from typing import Dict, List
import yaml
from envparse import env
from duplicity_backup_s3.defaults import (
FULL_IF_OLDER_THAN,
DUPLICITY_BACKUP_ARGS,
DUPLICITY_VERBOSITY,
... | 0 | 0 | 0 |
f056a0f67ba422fadd94ee2cfdb8509a75106571 | 13,136 | py | Python | local/ctm2tg.py | larissadias/ufpalign | 3bf60dc53ee2bb5d9479c35e9b85d32fdb7ef37c | [
"MIT"
] | null | null | null | local/ctm2tg.py | larissadias/ufpalign | 3bf60dc53ee2bb5d9479c35e9b85d32fdb7ef37c | [
"MIT"
] | null | null | null | local/ctm2tg.py | larissadias/ufpalign | 3bf60dc53ee2bb5d9479c35e9b85d32fdb7ef37c | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# vim: set fileencoding=utf-8
#
# ctm2tg: a script to convert CTM files from Kaldi aligner
# to Praat's TextGrid format
#
# Grupo FalaBrasil (2021)
# Universidade Federal do Pará
#
# author: apr 2019
# cassio batista - https://cassota.gitlab.io
# updated on apr 2021
impo... | 39.927052 | 96 | 0.505557 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# vim: set fileencoding=utf-8
#
# ctm2tg: a script to convert CTM files from Kaldi aligner
# to Praat's TextGrid format
#
# Grupo FalaBrasil (2021)
# Universidade Federal do Pará
#
# author: apr 2019
# cassio batista - https://cassota.gitlab.io
# updated on apr 2021
impo... | 5,438 | -6 | 258 |
7c9a189f6845c57ce4d443e83d26c11548702e55 | 43,875 | py | Python | src/1. Extraction of AEs and Causal Relations/run_extraction.py | nju-websoft/GeoCEQA | f2d6f27b750289bda646f1cd9b47cb78d70dc454 | [
"Apache-2.0"
] | null | null | null | src/1. Extraction of AEs and Causal Relations/run_extraction.py | nju-websoft/GeoCEQA | f2d6f27b750289bda646f1cd9b47cb78d70dc454 | [
"Apache-2.0"
] | null | null | null | src/1. Extraction of AEs and Causal Relations/run_extraction.py | nju-websoft/GeoCEQA | f2d6f27b750289bda646f1cd9b47cb78d70dc454 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team.
# Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a cop... | 52.797834 | 184 | 0.594097 | # coding=utf-8
# Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team.
# Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a cop... | 34,345 | 0 | 92 |
6ff96ce3b20610b463716eecc9e77ac66bf76f24 | 31,014 | py | Python | main.py | LamannaLeonardo/OLAM | 7a6611912ebb40d39a934dd454efec4cbb7913d3 | [
"MIT"
] | null | null | null | main.py | LamannaLeonardo/OLAM | 7a6611912ebb40d39a934dd454efec4cbb7913d3 | [
"MIT"
] | null | null | null | main.py | LamannaLeonardo/OLAM | 7a6611912ebb40d39a934dd454efec4cbb7913d3 | [
"MIT"
] | null | null | null | # Copyright (c) 2022, Leonardo Lamanna
# All rights reserved.
# This source code is licensed under the MIT-style license found in the
# LICENSE file in the root directory of this source tree.
import argparse
import os.path
import sys
import Configuration
from Util.Simulator import Simulator
from Util import preproces... | 39.307985 | 148 | 0.60376 | # Copyright (c) 2022, Leonardo Lamanna
# All rights reserved.
# This source code is licensed under the MIT-style license found in the
# LICENSE file in the root directory of this source tree.
import argparse
import os.path
import sys
import Configuration
from Util.Simulator import Simulator
from Util import preproces... | 5,402 | 0 | 92 |
599cdc16b682170398cd37bb569b11b7659c4a44 | 3,068 | py | Python | tool/bone_segementation_use_stacking/tool/recoverImage.py | YangXiaoo/NoteBook | 37056acad7a05b876832f72ac34d3d1a41e0dd22 | [
"CNRI-Python",
"RSA-MD",
"CECILL-B"
] | 58 | 2019-03-03T04:42:23.000Z | 2022-01-13T04:36:31.000Z | tool/bone_segementation_use_stacking/tool/recoverImage.py | YangXiaoo/NoteBook | 37056acad7a05b876832f72ac34d3d1a41e0dd22 | [
"CNRI-Python",
"RSA-MD",
"CECILL-B"
] | null | null | null | tool/bone_segementation_use_stacking/tool/recoverImage.py | YangXiaoo/NoteBook | 37056acad7a05b876832f72ac34d3d1a41e0dd22 | [
"CNRI-Python",
"RSA-MD",
"CECILL-B"
] | 28 | 2019-08-11T01:25:00.000Z | 2021-08-22T06:46:06.000Z | # coding:utf-8
# 2019-4-20
"""根据二值分割将原图进行分割
解决原因:对图像进行分割前对原图进行了增强处理,进行分割时是对增强图片进行分割,而不是基于原图分割。
现在根据对增强图片进行分割保存的二值图对原图进行分割,保存原图的分割图。
"""
import numpy as np
import os
import cv2
from tool import util
from tool import api
def getImageDict(originalFiles, binaryFiles):
"""获得原图对应的分割图路径
@param originalFiles 原图文件路径列表
... | 26.912281 | 89 | 0.750652 | # coding:utf-8
# 2019-4-20
"""根据二值分割将原图进行分割
解决原因:对图像进行分割前对原图进行了增强处理,进行分割时是对增强图片进行分割,而不是基于原图分割。
现在根据对增强图片进行分割保存的二值图对原图进行分割,保存原图的分割图。
"""
import numpy as np
import os
import cv2
from tool import util
from tool import api
def getImageDict(originalFiles, binaryFiles):
"""获得原图对应的分割图路径
@param originalFiles 原图文件路径列表
... | 0 | 0 | 0 |
fcd4bcd7d62ba933cf27c34fc02e18371a6b10a6 | 6,485 | py | Python | tools/make_shard_list.py | pengchengguo/wenet | 940dc164e5cfa9b8c0131688f0f9457af9563892 | [
"Apache-2.0"
] | 1,166 | 2021-05-19T03:09:09.000Z | 2022-03-31T16:48:42.000Z | tools/make_shard_list.py | pengchengguo/wenet | 940dc164e5cfa9b8c0131688f0f9457af9563892 | [
"Apache-2.0"
] | 282 | 2021-05-19T11:12:31.000Z | 2022-03-31T11:41:17.000Z | tools/make_shard_list.py | pengchengguo/wenet | 940dc164e5cfa9b8c0131688f0f9457af9563892 | [
"Apache-2.0"
] | 360 | 2021-05-19T06:57:34.000Z | 2022-03-31T03:24:35.000Z | #!/usr/bin/env python3
# Copyright (c) 2021 Mobvoi Inc. (authors: Binbin Zhang)
#
# 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 ... | 35.631868 | 79 | 0.536469 | #!/usr/bin/env python3
# Copyright (c) 2021 Mobvoi Inc. (authors: Binbin Zhang)
#
# 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 ... | 2,435 | 0 | 23 |
2c881f8492460e7a69dabd34001413e474f211c5 | 377 | py | Python | visualize.py | shi27feng/2D.pose.made.easy | f63040acf98d4732325345ebf28264edcce2e68f | [
"Apache-2.0"
] | null | null | null | visualize.py | shi27feng/2D.pose.made.easy | f63040acf98d4732325345ebf28264edcce2e68f | [
"Apache-2.0"
] | null | null | null | visualize.py | shi27feng/2D.pose.made.easy | f63040acf98d4732325345ebf28264edcce2e68f | [
"Apache-2.0"
] | null | null | null | from models import ResNet_Spec, ResNet
import hiddenlayer as hl
import torch
device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
print("device = ", device)
model = ResNet(ResNet_Spec[18])
hl_graph = hl.build_graph(model, torch.zeros([1, 3, 512, 512]).to(device=device))
hl_graph.theme = hl.graph.TH... | 31.416667 | 81 | 0.732095 | from models import ResNet_Spec, ResNet
import hiddenlayer as hl
import torch
device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
print("device = ", device)
model = ResNet(ResNet_Spec[18])
hl_graph = hl.build_graph(model, torch.zeros([1, 3, 512, 512]).to(device=device))
hl_graph.theme = hl.graph.TH... | 0 | 0 | 0 |
8be0862f6f4ebd2a04243992c60d301289353b80 | 3,710 | py | Python | tutorial/tutorial_08/graph.py | ekwan/cctk | 85cb8d0b714a80e8e353987dc24006695f1d0532 | [
"Apache-2.0"
] | 10 | 2020-01-16T15:26:57.000Z | 2022-01-15T23:12:00.000Z | tutorial/tutorial_08/graph.py | ekwan/cctk | 85cb8d0b714a80e8e353987dc24006695f1d0532 | [
"Apache-2.0"
] | 2 | 2020-05-27T21:04:36.000Z | 2020-09-26T20:49:53.000Z | tutorial/tutorial_08/graph.py | ekwan/cctk | 85cb8d0b714a80e8e353987dc24006695f1d0532 | [
"Apache-2.0"
] | 2 | 2020-09-24T18:44:18.000Z | 2021-08-05T20:35:51.000Z | import sys, re, glob
import numpy as np
import matplotlib.pyplot as plt
from cctk import GaussianFile, Molecule
import cctk.parse_gaussian as parse
#### Usage: ``python analyze_dipole.py "path/to/output/*.out"``
#### NOTE: It's crucial to wrap the wildcard-containing path in quotes!
#### NOTE: This file will reject ... | 35.333333 | 99 | 0.659569 | import sys, re, glob
import numpy as np
import matplotlib.pyplot as plt
from cctk import GaussianFile, Molecule
import cctk.parse_gaussian as parse
#### Usage: ``python analyze_dipole.py "path/to/output/*.out"``
#### NOTE: It's crucial to wrap the wildcard-containing path in quotes!
#### NOTE: This file will reject ... | 0 | 0 | 0 |
7ae9ee5f6bcec987b9f15ca4b9a045cc865568d6 | 4,169 | py | Python | aws/basics/awsdriver.py | vgouraba/dptg | ad7f7392d9d8ef179ad2d3354040c02ceb99a2c3 | [
"MIT"
] | 1 | 2021-08-07T17:11:49.000Z | 2021-08-07T17:11:49.000Z | aws/basics/awsdriver.py | madireddyr/dptg | 4a2eab4911c7947e99416b8c0ba6e0650e7cf97c | [
"MIT"
] | null | null | null | aws/basics/awsdriver.py | madireddyr/dptg | 4a2eab4911c7947e99416b8c0ba6e0650e7cf97c | [
"MIT"
] | 1 | 2021-07-25T18:01:00.000Z | 2021-07-25T18:01:00.000Z | import logging
import boto3
from ec2mgr import EC2Manager
from ssmmgr import SSMManager
class AWSDriver:
"""
The main program that handles the AWS related activities
"""
def init_vars(self, event, logger):
""" variable initialization """
self.logger = logger
self.logger.... | 36.252174 | 110 | 0.619573 | import logging
import boto3
from ec2mgr import EC2Manager
from ssmmgr import SSMManager
class AWSDriver:
"""
The main program that handles the AWS related activities
"""
def __init__(self):
# Placeholder for the variables. Actual assignment happens in the init_vars method
# This ... | 905 | 0 | 54 |
3061a9163cd3bff862fc27f797d128c0d2a59c1d | 2,325 | py | Python | pypcmgr/actions.py | cdkini/pypcmgr | 8cd89a75f5ef136842930c1b95ee5b531a44b4f3 | [
"CNRI-Python"
] | null | null | null | pypcmgr/actions.py | cdkini/pypcmgr | 8cd89a75f5ef136842930c1b95ee5b531a44b4f3 | [
"CNRI-Python"
] | null | null | null | pypcmgr/actions.py | cdkini/pypcmgr | 8cd89a75f5ef136842930c1b95ee5b531a44b4f3 | [
"CNRI-Python"
] | null | null | null | import argparse
import os
def run(path, flags):
"""TODO: Add method description!
Args:
path (str):
flags (argparse.Namespace):
"""
if flags.config and flags.default:
pass # Should raise error that flags cannot be both used
elif flags.config:
config(path, flags)
... | 25.271739 | 85 | 0.597849 | import argparse
import os
def run(path, flags):
"""TODO: Add method description!
Args:
path (str):
flags (argparse.Namespace):
"""
if flags.config and flags.default:
pass # Should raise error that flags cannot be both used
elif flags.config:
config(path, flags)
... | 0 | 0 | 0 |
3582d2ddca73e27cfad1dd134b6aaf3a3b3eb908 | 959 | py | Python | pyrobud/modules/manager.py | fakegit/pyrobud | 9626d534dc65b1cb4f93590a49c606c93b82a4e1 | [
"MIT"
] | 2 | 2019-10-24T03:37:33.000Z | 2019-12-23T02:09:10.000Z | pyrobud/modules/manager.py | fakegit/pyrobud | 9626d534dc65b1cb4f93590a49c606c93b82a4e1 | [
"MIT"
] | 15 | 2021-12-22T13:53:46.000Z | 2022-03-31T17:44:03.000Z | pyrobud/modules/manager.py | fakegit/pyrobud | 9626d534dc65b1cb4f93590a49c606c93b82a4e1 | [
"MIT"
] | 1 | 2020-05-30T20:22:32.000Z | 2020-05-30T20:22:32.000Z | from typing import ClassVar
from .. import command, module, util
| 29.060606 | 80 | 0.646507 | from typing import ClassVar
from .. import command, module, util
class ManagerModule(module.Module):
name: ClassVar[str] = "Manager"
@command.desc("Reload all modules")
@command.alias("ra", "reload", "r")
async def cmd_reloadall(self, ctx: command.Context) -> str:
before = util.time.usec()
... | 712 | 157 | 23 |
c927e21e35aedbb7ae7041ddded2e387b6cb06a9 | 1,004 | py | Python | linked_list.py | dvtate/single-file-programs | 1c54833ebee5fa20d04b1d36c59fb553de985812 | [
"MIT"
] | 2 | 2017-09-04T05:11:53.000Z | 2020-01-18T22:31:25.000Z | linked_list.py | dvtate/single-file-programs | 1c54833ebee5fa20d04b1d36c59fb553de985812 | [
"MIT"
] | null | null | null | linked_list.py | dvtate/single-file-programs | 1c54833ebee5fa20d04b1d36c59fb553de985812 | [
"MIT"
] | null | null | null |
first = Node();
first.data = 5;
ll = LinkedList();
ll.add(first);
blah = Node();
ll.add(blah);
print(first);
| 15.936508 | 72 | 0.606574 | class Node(object):
def __init__(self):
self.data = None;
self.next = None;
self.prev = None;
def __init__(self):
self.data = None;
self.next = None;
self.prev = None;
def __str__(self):
return str(self.data);
class LinkedList(object):
def __init__(self):
self.head = None;
self.tail = ... | 655 | 2 | 221 |
1ce14cc699db08a51a22a5f7f83f6e592baa5e26 | 1,912 | py | Python | notebooks/EDA/S04-customers.py | c74p/Capstone-SalesForecasting | 9c7950dc2fe839a04a0521f7da1ed3936496cd94 | [
"MIT"
] | null | null | null | notebooks/EDA/S04-customers.py | c74p/Capstone-SalesForecasting | 9c7950dc2fe839a04a0521f7da1ed3936496cd94 | [
"MIT"
] | 11 | 2020-03-24T16:52:00.000Z | 2022-03-11T23:42:54.000Z | notebooks/EDA/S04-customers.py | c74p/Capstone-SalesForecasting | 9c7950dc2fe839a04a0521f7da1ed3936496cd94 | [
"MIT"
] | null | null | null | import cauldron as cd
import matplotlib
import matplotlib.pyplot as plt
plt.rcParams.update({'figure.max_open_warning': 0}) # NOQA
import seaborn as sns
sns.set() # NOQA, need this for styling
import pandas as pd
import os, sys # NOQA
sys.path.append('../../src/data')
import make_dataset # NOQA, need the lines above t... | 37.490196 | 79 | 0.730126 | import cauldron as cd
import matplotlib
import matplotlib.pyplot as plt
plt.rcParams.update({'figure.max_open_warning': 0}) # NOQA
import seaborn as sns
sns.set() # NOQA, need this for styling
import pandas as pd
import os, sys # NOQA
sys.path.append('../../src/data')
import make_dataset # NOQA, need the lines above t... | 0 | 0 | 0 |
07318a8bfbf89261343f3bb547e68839d822444a | 7,566 | py | Python | src/primaires/pnj/prototype.py | vlegoff/tsunami | 36b3b974f6eefbf15cd5d5f099fc14630e66570b | [
"BSD-3-Clause"
] | 14 | 2015-08-21T19:15:21.000Z | 2017-11-26T13:59:17.000Z | src/primaires/pnj/prototype.py | vincent-lg/tsunami | 36b3b974f6eefbf15cd5d5f099fc14630e66570b | [
"BSD-3-Clause"
] | 20 | 2015-09-29T20:50:45.000Z | 2018-06-21T12:58:30.000Z | src/primaires/pnj/prototype.py | vlegoff/tsunami | 36b3b974f6eefbf15cd5d5f099fc14630e66570b | [
"BSD-3-Clause"
] | 3 | 2015-05-02T19:42:03.000Z | 2018-09-06T10:55:00.000Z | # -*-coding:Utf-8 -*
# -*-coding:Utf-8 -*
# Copyright (c) 2010-2017 LE GOFF Vincent
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copy... | 32.333333 | 79 | 0.604811 | # -*-coding:Utf-8 -*
# -*-coding:Utf-8 -*
# Copyright (c) 2010-2017 LE GOFF Vincent
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copy... | 1,313 | 0 | 318 |
86a7d29632c14f676a212dcc633ea550f493745f | 5,223 | py | Python | kolibri/utils/sanity_checks.py | priyanka-choubey/kolibri | 4070dc158634ab47c6e127768f0aed7548c0a182 | [
"MIT"
] | 1 | 2020-03-30T05:06:59.000Z | 2020-03-30T05:06:59.000Z | kolibri/utils/sanity_checks.py | priyanka-choubey/kolibri | 4070dc158634ab47c6e127768f0aed7548c0a182 | [
"MIT"
] | null | null | null | kolibri/utils/sanity_checks.py | priyanka-choubey/kolibri | 4070dc158634ab47c6e127768f0aed7548c0a182 | [
"MIT"
] | null | null | null | import logging
import os
import shutil
import sys
import portend
from django.apps import apps
from django.core.management import call_command
from django.db.utils import OperationalError
from .conf import KOLIBRI_HOME
from .conf import OPTIONS
from .options import generate_empty_options_file
from .server import get_s... | 31.089286 | 96 | 0.651733 | import logging
import os
import shutil
import sys
import portend
from django.apps import apps
from django.core.management import call_command
from django.db.utils import OperationalError
from .conf import KOLIBRI_HOME
from .conf import OPTIONS
from .options import generate_empty_options_file
from .server import get_s... | 388 | 0 | 23 |
b9b83f9361646d2f1e2377f068bb01dec854c8ec | 540 | py | Python | mspray/apps/main/views/sensitization_visit.py | onaio/mspray | b3e0f4b5855abbf0298de6b66f2e9f472f2bf838 | [
"Apache-2.0"
] | null | null | null | mspray/apps/main/views/sensitization_visit.py | onaio/mspray | b3e0f4b5855abbf0298de6b66f2e9f472f2bf838 | [
"Apache-2.0"
] | 76 | 2018-03-15T09:37:56.000Z | 2019-05-15T12:45:51.000Z | mspray/apps/main/views/sensitization_visit.py | onaio/mspray | b3e0f4b5855abbf0298de6b66f2e9f472f2bf838 | [
"Apache-2.0"
] | 1 | 2020-10-31T07:15:22.000Z | 2020-10-31T07:15:22.000Z | # -*- coding: utf-8 -*-
"""
Sensitization Visit view.
"""
from rest_framework import status
from rest_framework.response import Response
from rest_framework.views import APIView
from mspray.apps.main.models.sensitization_visit import (
create_sensitization_visit
)
class SensitizationVisitView(APIView):
"""S... | 24.545455 | 57 | 0.748148 | # -*- coding: utf-8 -*-
"""
Sensitization Visit view.
"""
from rest_framework import status
from rest_framework.response import Response
from rest_framework.views import APIView
from mspray.apps.main.models.sensitization_visit import (
create_sensitization_visit
)
class SensitizationVisitView(APIView):
"""S... | 0 | 0 | 0 |
3f97aa9a30452a3dea5fcd037ab80832f451ff0f | 1,093 | py | Python | uninond/management/commands/export_xls.py | yeleman/uninond | 0b130e68c6a0799d896f060cfc925b467b179fe6 | [
"MIT"
] | null | null | null | uninond/management/commands/export_xls.py | yeleman/uninond | 0b130e68c6a0799d896f060cfc925b467b179fe6 | [
"MIT"
] | null | null | null | uninond/management/commands/export_xls.py | yeleman/uninond | 0b130e68c6a0799d896f060cfc925b467b179fe6 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# vim: ai ts=4 sts=4 et sw=4 nu
from __future__ import (unicode_literals, absolute_import,
division, print_function)
import logging
import os
import sys
from django.core.management.base import BaseCommand
from optparse import make_option
from unin... | 26.02381 | 62 | 0.584629 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# vim: ai ts=4 sts=4 et sw=4 nu
from __future__ import (unicode_literals, absolute_import,
division, print_function)
import logging
import os
import sys
from django.core.management.base import BaseCommand
from optparse import make_option
from unin... | 450 | 232 | 23 |
c5c38ba79822c1eaf797e22ea077ac477836461b | 3,138 | py | Python | bmus_cnn.py | MedicalDataAI/LNMP | 8d22e543a26d6830de9525ebe56a47e2a08505f7 | [
"CC0-1.0"
] | 2 | 2020-08-06T09:14:23.000Z | 2020-11-11T04:43:56.000Z | bmus_cnn.py | MedicalDataAI/demoshow | 65ad65ce1551d102b4190e972235c90498a75e83 | [
"CC0-1.0"
] | null | null | null | bmus_cnn.py | MedicalDataAI/demoshow | 65ad65ce1551d102b4190e972235c90498a75e83 | [
"CC0-1.0"
] | null | null | null | from __future__ import print_function
# to filter some unnecessory warning messages
import warnings
warnings.filterwarnings("ignore", message="numpy.dtype size changed")
warnings.filterwarnings("ignore", message="numpy.ufunc size changed")
import os
import numpy as np
import pandas as pd
import glob
import keras
from... | 32.6875 | 140 | 0.682919 | from __future__ import print_function
# to filter some unnecessory warning messages
import warnings
warnings.filterwarnings("ignore", message="numpy.dtype size changed")
warnings.filterwarnings("ignore", message="numpy.ufunc size changed")
import os
import numpy as np
import pandas as pd
import glob
import keras
from... | 2,149 | 0 | 69 |
f7d49274054ba9648a11c608de1dd2a0fb96f79c | 649 | py | Python | example/example/urls.py | xfenix/django-media-manager | e5bf61f1c5188681dec8b8237b44b106567f8273 | [
"BSD-3-Clause"
] | 26 | 2015-01-08T03:04:35.000Z | 2021-09-09T01:31:10.000Z | example/example/urls.py | xfenix/django-media-manager | e5bf61f1c5188681dec8b8237b44b106567f8273 | [
"BSD-3-Clause"
] | 11 | 2015-03-05T11:35:47.000Z | 2021-06-10T17:38:28.000Z | example/example/urls.py | xfenix/django-media-manager | e5bf61f1c5188681dec8b8237b44b106567f8273 | [
"BSD-3-Clause"
] | 26 | 2015-02-12T14:49:31.000Z | 2019-07-29T08:30:41.000Z | from django.conf.urls import patterns, include, url
from django.conf import settings
from django.contrib import admin
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
from django.conf.urls.static import static
admin.autodiscover()
urlpatterns = patterns('',
(r'^admin/filebrowser/', include('fi... | 28.217391 | 80 | 0.747304 | from django.conf.urls import patterns, include, url
from django.conf import settings
from django.contrib import admin
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
from django.conf.urls.static import static
admin.autodiscover()
urlpatterns = patterns('',
(r'^admin/filebrowser/', include('fi... | 0 | 0 | 0 |
e5245a361f89cd0fe366f0d5ab32f247fac0075e | 1,447 | py | Python | main.py | sanjeev309/synthetic_bbox_regression_db_tool | 73ad6efe22bba3f2ab019bd7358e4cbc23f7e9cb | [
"MIT"
] | 2 | 2019-03-01T21:13:01.000Z | 2019-03-02T14:55:57.000Z | main.py | sanjeev309/synthetic_bbox_regression_db_tool | 73ad6efe22bba3f2ab019bd7358e4cbc23f7e9cb | [
"MIT"
] | null | null | null | main.py | sanjeev309/synthetic_bbox_regression_db_tool | 73ad6efe22bba3f2ab019bd7358e4cbc23f7e9cb | [
"MIT"
] | null | null | null | import numpy as np
import cv2
TOTAL_IMAGES = 1000
STORE_IMAGES = False
IMAGE_DIMENSION = 100
NUM_CHANNELS = 1
PADDING_MIN = 10
PADDING_MAX = 20
MIN_BOX_DIM = 40
if __name__ == "__main__":
main()
| 28.372549 | 104 | 0.609537 | import numpy as np
import cv2
TOTAL_IMAGES = 1000
STORE_IMAGES = False
IMAGE_DIMENSION = 100
NUM_CHANNELS = 1
PADDING_MIN = 10
PADDING_MAX = 20
MIN_BOX_DIM = 40
def return_random_bbox_value(start, end, num_values=4):
x, y = np.random.randint(start, end - 60, size=num_values - 2)
gap_w, gap_h = np.random.rand... | 1,197 | 0 | 46 |
bbb4b70954032901e7cffa9f9b103a77b99219f4 | 2,755 | py | Python | diff_gpmp2/robot_models/point_robot_xyh.py | mhmukadam/dgpmp2 | b55c10f2a2fcff2cbf0e3291e0fff97fefa86661 | [
"BSD-3-Clause"
] | 31 | 2020-08-12T19:07:29.000Z | 2022-02-22T10:52:53.000Z | diff_gpmp2/robot_models/point_robot_xyh.py | mhmukadam/dgpmp2 | b55c10f2a2fcff2cbf0e3291e0fff97fefa86661 | [
"BSD-3-Clause"
] | null | null | null | diff_gpmp2/robot_models/point_robot_xyh.py | mhmukadam/dgpmp2 | b55c10f2a2fcff2cbf0e3291e0fff97fefa86661 | [
"BSD-3-Clause"
] | 7 | 2020-08-14T14:41:39.000Z | 2021-11-03T08:17:09.000Z | #!/usr/bin/env python
import torch
from .robot_model import RobotModel
| 45.163934 | 98 | 0.684936 | #!/usr/bin/env python
import torch
from .robot_model import RobotModel
class PointRobotXYH(RobotModel):
def __init__(self, sphere_radii, use_cuda=False):
dofs = 3
nlinks = 1
wksp_dim = 2
state_dim = 6
super(PointRobotXYH, self).__init__(dofs, nlinks, wksp_dim, state_dim, sphere_radii, use_cuda)
... | 2,520 | 11 | 149 |
0f06d67ac1271cf3d5378a796c1244dbc7e76717 | 11,866 | py | Python | tests/test_pubmed.py | shapiromatron/get_litter | 82caf8caae3cfbeee8b764c9c9e735d420819f06 | [
"MIT"
] | 5 | 2017-09-20T21:22:05.000Z | 2020-05-20T21:36:27.000Z | tests/test_pubmed.py | shapiromatron/get_litter | 82caf8caae3cfbeee8b764c9c9e735d420819f06 | [
"MIT"
] | null | null | null | tests/test_pubmed.py | shapiromatron/get_litter | 82caf8caae3cfbeee8b764c9c9e735d420819f06 | [
"MIT"
] | 3 | 2017-05-22T13:41:40.000Z | 2018-07-23T13:19:35.000Z | import os
from unittest import TestCase
from litter_getter import pubmed
| 58.166667 | 1,991 | 0.687932 | import os
from unittest import TestCase
from litter_getter import pubmed
def _pubmed_connect():
pubmed_api_key = os.environ.get("PUBMED_API_KEY")
if pubmed_api_key is None:
raise EnvironmentError("Test environment requires $PUBMED_API_KEY to be set.")
pubmed.settings.connect(pubmed_api_key)
cla... | 5,588 | 6,135 | 69 |
b28de68bf13a54604328d23c2684c9c909591a16 | 1,196 | py | Python | gui/client_gui.py | IsikcanYilmaz/kitty_surveillance | d5318ca360ae047864f33355eb7871a0381772c7 | [
"MIT"
] | null | null | null | gui/client_gui.py | IsikcanYilmaz/kitty_surveillance | d5318ca360ae047864f33355eb7871a0381772c7 | [
"MIT"
] | null | null | null | gui/client_gui.py | IsikcanYilmaz/kitty_surveillance | d5318ca360ae047864f33355eb7871a0381772c7 | [
"MIT"
] | null | null | null | #!/usr/bin/python3
import sys
from PyQt5 import QtCore, QtGui, QtWidgets
from PyQt5.QtWidgets import QApplication, QWidget
from gui.button_panel import *
from gui.video_panel import *
from gui.xy_pad_panel import *
if __name__ == '__main__':
GuiThread()
| 27.181818 | 56 | 0.685619 | #!/usr/bin/python3
import sys
from PyQt5 import QtCore, QtGui, QtWidgets
from PyQt5.QtWidgets import QApplication, QWidget
from gui.button_panel import *
from gui.video_panel import *
from gui.xy_pad_panel import *
class MainWindow(QWidget):
def __init__(self, clientHandle):
super(MainWindow, self).__init... | 831 | 5 | 99 |
418aef5d322ec626b125c21a3ff5576f1b199e68 | 642 | py | Python | config.py | xxbsg/fx | 6a6d913a168bf36b773c0f1a1cd1788977d144a7 | [
"MIT"
] | null | null | null | config.py | xxbsg/fx | 6a6d913a168bf36b773c0f1a1cd1788977d144a7 | [
"MIT"
] | null | null | null | config.py | xxbsg/fx | 6a6d913a168bf36b773c0f1a1cd1788977d144a7 | [
"MIT"
] | null | null | null | # 配置
import logging
from redis import StrictRedis
zd={'ts':tiaoshi,'xs':xianshang} | 24.692308 | 80 | 0.738318 | # 配置
import logging
from redis import StrictRedis
class peiz(object):
DEBUG=True
SQLALCHEMY_DATABASE_URI="mysql://root:mysql@localhost:3306/f_db" #数据数据库
SQLALCHEMY_TRACK_MODIFICATIONS=False#数据数据库
#session
SESSION_TYPE='redis'#session使用redis数据库
SESSION_REDIS=StrictRedis(host='192.168.47.128... | 0 | 533 | 67 |
eb2e33642db9ae99299dc08e8b5bd204f30f55ee | 895 | py | Python | aocpo_spider/school_spider/school_spider/spiders/schoolSpider.py | CoderChen01/aocpo | 279bfae910a30be762e1954df1a53a6217a6e300 | [
"Apache-2.0"
] | 7 | 2020-02-17T12:20:26.000Z | 2021-03-15T01:02:34.000Z | aocpo_spider/school_spider/school_spider/spiders/schoolSpider.py | CoderChen01/aocpo | 279bfae910a30be762e1954df1a53a6217a6e300 | [
"Apache-2.0"
] | 3 | 2020-04-19T03:01:41.000Z | 2020-04-19T03:02:09.000Z | aocpo_spider/school_spider/school_spider/spiders/schoolSpider.py | CoderChen01/aocpo | 279bfae910a30be762e1954df1a53a6217a6e300 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
import scrapy
from scrapy.http import Request
from ..items import SchoolSpiderItem
| 31.964286 | 112 | 0.620112 | # -*- coding: utf-8 -*-
import scrapy
from scrapy.http import Request
from ..items import SchoolSpiderItem
class SchoolSpider(scrapy.Spider):
name = 'schoolSpider'
allowed_domains = ['school.nihaowang.com']
start_urls = ['http://school.nihaowang.com/']
base_url = 'http://school.nihaowang.com/rank/6122... | 505 | 258 | 23 |
e88d450939e6b7166f3b60dcf021da7744757312 | 9,384 | py | Python | Metric/depth_KITTI.py | ZM-Zhou/MDE_Platform_Pytorch | d86efe061bf14a6eed3352cc45e1437e46c138b1 | [
"MIT"
] | null | null | null | Metric/depth_KITTI.py | ZM-Zhou/MDE_Platform_Pytorch | d86efe061bf14a6eed3352cc45e1437e46c138b1 | [
"MIT"
] | null | null | null | Metric/depth_KITTI.py | ZM-Zhou/MDE_Platform_Pytorch | d86efe061bf14a6eed3352cc45e1437e46c138b1 | [
"MIT"
] | null | null | null | import numpy as np
import json
import PIL.ImageFont as ImageFont
import PIL.Image as pil
from PIL import ImageDraw
import matplotlib as mpl
import matplotlib.cm as cm
import cv2 as cv
import torch
from torch.utils.data import DataLoader
import torch.nn.functional as F
from torchvision import transforms
... | 43.646512 | 90 | 0.48945 | import numpy as np
import json
import PIL.ImageFont as ImageFont
import PIL.Image as pil
from PIL import ImageDraw
import matplotlib as mpl
import matplotlib.cm as cm
import cv2 as cv
import torch
from torch.utils.data import DataLoader
import torch.nn.functional as F
from torchvision import transforms
... | 8,482 | -6 | 143 |
8cbf74c0236bd1c2db2c14d2795bbd0ffdc6eb27 | 1,523 | py | Python | zprev versions/zfirstderivs copy1.py | lefthandedroo/Cosmodels | c355d18021467cf92546cf2fc9cb1d1abe59b8d8 | [
"MIT"
] | null | null | null | zprev versions/zfirstderivs copy1.py | lefthandedroo/Cosmodels | c355d18021467cf92546cf2fc9cb1d1abe59b8d8 | [
"MIT"
] | null | null | null | zprev versions/zfirstderivs copy1.py | lefthandedroo/Cosmodels | c355d18021467cf92546cf2fc9cb1d1abe59b8d8 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Thu Feb 15 13:23:25 2018
@author: BallBlueMeercat
"""
# Eq of state parameters for known fluids:
w_r = 1/3 # radiation
w_m = 0.0 # matter
w_de = -1.0 # cosmological constant (dark energy?)
def zfirstderivs(v, t, gamma):
"""
Takes in:
... | 29.288462 | 101 | 0.455023 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Thu Feb 15 13:23:25 2018
@author: BallBlueMeercat
"""
# Eq of state parameters for known fluids:
w_r = 1/3 # radiation
w_m = 0.0 # matter
w_de = -1.0 # cosmological constant (dark energy?)
def zfirstderivs(v, t, gamma):
"""
Takes in:
... | 0 | 0 | 0 |
3b7924750952207d8c24778f9b4f9425f83aa1db | 2,326 | py | Python | test_app.py | fluffy-critter/Publ | 868c5a17c605707dde4d1a95d79405301bd12f05 | [
"MIT"
] | 6 | 2018-03-29T02:07:44.000Z | 2018-09-26T00:17:31.000Z | test_app.py | fluffy-critter/Publ | 868c5a17c605707dde4d1a95d79405301bd12f05 | [
"MIT"
] | 82 | 2018-04-01T08:53:59.000Z | 2018-09-28T23:45:05.000Z | test_app.py | fluffy-critter/Publ | 868c5a17c605707dde4d1a95d79405301bd12f05 | [
"MIT"
] | null | null | null | """ Smoke test site runner """
# pylint:disable=invalid-name
import logging
import os
try:
import authl.flask
except ImportError:
authl = None
try:
import whoosh
except ImportError:
whoosh = None
import flask
import publ
import publ.image
APP_PATH = os.path.join(os.path.dirname(os.path.abspath(__f... | 28.365854 | 92 | 0.643594 | """ Smoke test site runner """
# pylint:disable=invalid-name
import logging
import os
try:
import authl.flask
except ImportError:
authl = None
try:
import whoosh
except ImportError:
whoosh = None
import flask
import publ
import publ.image
APP_PATH = os.path.join(os.path.dirname(os.path.abspath(__f... | 0 | 0 | 0 |
1c2232cc27c82751a1725348162fac071fbadfce | 2,211 | py | Python | Dia1/numpy2.py | MarcelRG/semanai | 08a1ceb9f24b361fc155bf18526325aaf6769798 | [
"MIT"
] | null | null | null | Dia1/numpy2.py | MarcelRG/semanai | 08a1ceb9f24b361fc155bf18526325aaf6769798 | [
"MIT"
] | null | null | null | Dia1/numpy2.py | MarcelRG/semanai | 08a1ceb9f24b361fc155bf18526325aaf6769798 | [
"MIT"
] | null | null | null | import streamlit as st
import pandas as pd
import numpy as np
import time
import uber_display
from scipy import stats
"# Numpy and Pandas Tutorial"
"### Semana i 2019"
"Made in Streamlit"
if st.checkbox('Show Uber Data'):
st.subheader('Uber data data')
uber_display.main()
"""# Numpy exercises """
"- **Show... | 21.259615 | 161 | 0.615559 | import streamlit as st
import pandas as pd
import numpy as np
import time
import uber_display
from scipy import stats
"# Numpy and Pandas Tutorial"
"### Semana i 2019"
"Made in Streamlit"
if st.checkbox('Show Uber Data'):
st.subheader('Uber data data')
uber_display.main()
"""# Numpy exercises """
"- **Show... | 167 | 0 | 22 |
4e1dc5685890c3e906cc8015ffc62bdf8b62835b | 622 | py | Python | backend/api/settings.py | mariaozamiz/hacking-for-humanity | e989a504f63e235edd343146b132f6cae277dd40 | [
"MIT"
] | 3 | 2020-11-21T19:57:27.000Z | 2021-11-04T20:30:45.000Z | backend/api/settings.py | mariaozamiz/hacking-for-humanity | e989a504f63e235edd343146b132f6cae277dd40 | [
"MIT"
] | null | null | null | backend/api/settings.py | mariaozamiz/hacking-for-humanity | e989a504f63e235edd343146b132f6cae277dd40 | [
"MIT"
] | 2 | 2020-11-21T19:57:32.000Z | 2020-11-26T21:27:02.000Z | from secrets import token_urlsafe
from starlette.config import Config
# Config will be read from environment variables and/or ".env" files.
from starlette.datastructures import Secret
config = Config(".env")
DEBUG = config("DEBUG", cast=bool, default=False)
TESTING = config("TESTING", cast=bool, default=False)
HTTP... | 36.588235 | 69 | 0.778135 | from secrets import token_urlsafe
from starlette.config import Config
# Config will be read from environment variables and/or ".env" files.
from starlette.datastructures import Secret
config = Config(".env")
DEBUG = config("DEBUG", cast=bool, default=False)
TESTING = config("TESTING", cast=bool, default=False)
HTTP... | 0 | 0 | 0 |
d4ee721755f85bc65664f17c0ca1459716613096 | 5,649 | py | Python | task_inventory/order_1_to_30/order_30_crawl_all_cainiao_stations.py | flyingSprite/spinelle | 57834368abb5fb4eb73a8fb29226a30014254e40 | [
"MIT"
] | 1 | 2016-07-22T01:58:53.000Z | 2016-07-22T01:58:53.000Z | task_inventory/order_1_to_30/order_30_crawl_all_cainiao_stations.py | flyingSprite/spinelle | 57834368abb5fb4eb73a8fb29226a30014254e40 | [
"MIT"
] | 5 | 2016-07-26T02:02:47.000Z | 2018-05-16T08:08:42.000Z | task_inventory/order_1_to_30/order_30_crawl_all_cainiao_stations.py | flyingSprite/spinelle | 57834368abb5fb4eb73a8fb29226a30014254e40 | [
"MIT"
] | null | null | null |
"""Order 30: Crawl all cainiao stations
from url 'https://cart.taobao.com/cart.htm?spm=875.7931836%2FB.a2226mz.11.67fc5d461PCKtS&from=btop'
"""
import time
from faker import Faker
from selenium import webdriver
from selenium.common.exceptions import NoSuchElementException
from scrapy import Selector
from scrapy.http ... | 35.980892 | 112 | 0.654452 |
"""Order 30: Crawl all cainiao stations
from url 'https://cart.taobao.com/cart.htm?spm=875.7931836%2FB.a2226mz.11.67fc5d461PCKtS&from=btop'
"""
import time
from faker import Faker
from selenium import webdriver
from selenium.common.exceptions import NoSuchElementException
from scrapy import Selector
from scrapy.http ... | 4,111 | 513 | 115 |
91c161901c0ee4fd87a52bb4a82a638c8c8e862c | 2,100 | py | Python | autostart/state.py | allenx5612/dwm | 84070c80a5614a952660ecdf538839aa2bca876a | [
"MIT"
] | null | null | null | autostart/state.py | allenx5612/dwm | 84070c80a5614a952660ecdf538839aa2bca876a | [
"MIT"
] | null | null | null | autostart/state.py | allenx5612/dwm | 84070c80a5614a952660ecdf538839aa2bca876a | [
"MIT"
] | null | null | null | #!/usr/bin/python3
# -*- coding! utf-8 -*-
import os
import time
from subprocess import Popen, PIPE
from datetime import datetime
import psutil
if __name__ == '__main__':
bat_sign = []
while True:
os.system('xsetroot -name "{}"'.format(sys_state()))
| 26.582278 | 75 | 0.545238 | #!/usr/bin/python3
# -*- coding! utf-8 -*-
import os
import time
from subprocess import Popen, PIPE
from datetime import datetime
import psutil
def sys_state():
state = ''
# net speed
s1 = psutil.net_io_counters()
time.sleep(1)
s2 = psutil.net_io_counters()
down_speed = (s2.bytes_recv - s1.... | 1,847 | 0 | 23 |
ae01eec9c4809cbadc3a6cd6ce7ff66a402049aa | 2,045 | py | Python | datetime_drill.py | gcguevara/file_transfer_app | a2401f6aa9915d22242844c926e79ff7743766bf | [
"MIT"
] | null | null | null | datetime_drill.py | gcguevara/file_transfer_app | a2401f6aa9915d22242844c926e79ff7743766bf | [
"MIT"
] | null | null | null | datetime_drill.py | gcguevara/file_transfer_app | a2401f6aa9915d22242844c926e79ff7743766bf | [
"MIT"
] | null | null | null | """ Python Workplace Simulation
Author: Garrett Guevara
Written/Tested in Python Version 3.5.2
Task: Your company is headquartered in Portland, OR.
They've opened two new branches in NYC and London. They
ask that you create a program that tells if the branches
are open or closed based on the current time at HQ.
All b... | 29.637681 | 80 | 0.670905 | """ Python Workplace Simulation
Author: Garrett Guevara
Written/Tested in Python Version 3.5.2
Task: Your company is headquartered in Portland, OR.
They've opened two new branches in NYC and London. They
ask that you create a program that tells if the branches
are open or closed based on the current time at HQ.
All b... | 144 | 0 | 54 |
d833f4e5a2be06570bada60510fe057de60e5e92 | 189 | py | Python | reddit_detective/analytics/__init__.py | LaTueur/reddit-detective | 09a3c9b31e2ff572607d616906560d06bb22407c | [
"MIT"
] | 173 | 2020-11-07T14:07:28.000Z | 2022-03-16T01:58:11.000Z | reddit_detective/analytics/__init__.py | LaTueur/reddit-detective | 09a3c9b31e2ff572607d616906560d06bb22407c | [
"MIT"
] | 23 | 2020-11-09T20:21:00.000Z | 2021-12-12T11:23:28.000Z | reddit_detective/analytics/__init__.py | LaTueur/reddit-detective | 09a3c9b31e2ff572607d616906560d06bb22407c | [
"MIT"
] | 10 | 2020-11-09T17:31:31.000Z | 2021-12-11T17:15:20.000Z | """
reddit_detective.analytics provides basic metrics for a given Node.
For more complex stuff, use Neo4j GDSC or this package:
https://github.com/neo4j-graph-analytics/networkx-neo4j
"""
| 27 | 67 | 0.783069 | """
reddit_detective.analytics provides basic metrics for a given Node.
For more complex stuff, use Neo4j GDSC or this package:
https://github.com/neo4j-graph-analytics/networkx-neo4j
"""
| 0 | 0 | 0 |
2466eaa3c0810d7e8a2d36e553005e35ebe8f1ce | 5,772 | py | Python | src/nap/http/__init__.py | timgates42/django-nap | 34a2a3f9a194457ea5391b62d49f8ee975bc5aeb | [
"BSD-3-Clause"
] | 114 | 2015-01-15T23:03:38.000Z | 2021-11-02T07:58:08.000Z | src/nap/http/__init__.py | timgates42/django-nap | 34a2a3f9a194457ea5391b62d49f8ee975bc5aeb | [
"BSD-3-Clause"
] | 23 | 2015-01-08T00:37:24.000Z | 2021-02-06T09:30:15.000Z | src/nap/http/__init__.py | timgates42/django-nap | 34a2a3f9a194457ea5391b62d49f8ee975bc5aeb | [
"BSD-3-Clause"
] | 19 | 2015-01-13T17:19:50.000Z | 2020-03-09T11:02:38.000Z |
import http.client
import re
from collections import OrderedDict
from urllib.parse import urlparse
from django.core.exceptions import SuspiciousOperation
from django.http import HttpResponse, JsonResponse # NOQA
from django.utils.encoding import iri_to_uri
'''Add some missing HttpResponse sub-classes'''
STATUS_CO... | 23.274194 | 75 | 0.775121 |
import http.client
import re
from collections import OrderedDict
from urllib.parse import urlparse
from django.core.exceptions import SuspiciousOperation
from django.http import HttpResponse, JsonResponse # NOQA
from django.utils.encoding import iri_to_uri
'''Add some missing HttpResponse sub-classes'''
STATUS_CO... | 481 | 2,638 | 922 |
07afd9d48eb248b3ec3e9a2ac5afeb4f75680f0a | 12,158 | py | Python | azure/Kqlmagic/draft_client.py | ForrestTrepte/jupyter-Kqlmagic | 3dec41e7eb44d43bad30aca64d72144895322188 | [
"MIT"
] | null | null | null | azure/Kqlmagic/draft_client.py | ForrestTrepte/jupyter-Kqlmagic | 3dec41e7eb44d43bad30aca64d72144895322188 | [
"MIT"
] | null | null | null | azure/Kqlmagic/draft_client.py | ForrestTrepte/jupyter-Kqlmagic | 3dec41e7eb44d43bad30aca64d72144895322188 | [
"MIT"
] | null | null | null | # -------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
# --------------------------------------------------------------------------
from typi... | 42.659649 | 178 | 0.639743 | # -------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
# --------------------------------------------------------------------------
from typi... | 1,710 | 0 | 53 |
bc106cfa48da942fe83cb98715ecf3627c98e0aa | 698 | py | Python | Coursera/Python for Everybody Specialization/Mixed courses scripts/Scraping Numbers from HTML using BeautifulSoup.py | ejgarcia1991/Courses-and-other-non-professional-projects | 94794dd1d6cf626de174330311e3fde4d10cd460 | [
"MIT"
] | 1 | 2021-02-19T22:33:55.000Z | 2021-02-19T22:33:55.000Z | Coursera/Python for Everybody Specialization/Mixed courses scripts/Scraping Numbers from HTML using BeautifulSoup.py | ejgarcia1991/Courses-and-other-non-professional-projects | 94794dd1d6cf626de174330311e3fde4d10cd460 | [
"MIT"
] | null | null | null | Coursera/Python for Everybody Specialization/Mixed courses scripts/Scraping Numbers from HTML using BeautifulSoup.py | ejgarcia1991/Courses-and-other-non-professional-projects | 94794dd1d6cf626de174330311e3fde4d10cd460 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Wed Jul 8 16:20:20 2020
@author: Eilder Jorge
"""
# To run this, download the BeautifulSoup zip file
# http://www.py4e.com/code3/bs4.zip
# and unzip it in the same directory as this file
from urllib.request import urlopen
from bs4 import BeautifulSoup
import ssl
# Ignore SSL ... | 22.516129 | 58 | 0.724928 | # -*- coding: utf-8 -*-
"""
Created on Wed Jul 8 16:20:20 2020
@author: Eilder Jorge
"""
# To run this, download the BeautifulSoup zip file
# http://www.py4e.com/code3/bs4.zip
# and unzip it in the same directory as this file
from urllib.request import urlopen
from bs4 import BeautifulSoup
import ssl
# Ignore SSL ... | 0 | 0 | 0 |
e2e1c42a484a237c1013c9ba7b037a9d1edbc9a9 | 3,673 | py | Python | supermariobros/train.py | iamslash/examplesofml | 524b9daa31f81f35226d85737e15b62d6813a68c | [
"MIT"
] | null | null | null | supermariobros/train.py | iamslash/examplesofml | 524b9daa31f81f35226d85737e15b62d6813a68c | [
"MIT"
] | null | null | null | supermariobros/train.py | iamslash/examplesofml | 524b9daa31f81f35226d85737e15b62d6813a68c | [
"MIT"
] | null | null | null | import random
import typing
from gym_super_mario_bros import make
from gym_super_mario_bros.actions import SIMPLE_MOVEMENT
from keras.layers import Dense
from keras.optimizers import Adam
from keras.models import Sequential
from nes_py.wrappers import BinarySpaceToDiscreteSpaceEnv
from numpy import argmax, float32, re... | 31.393162 | 89 | 0.620746 | import random
import typing
from gym_super_mario_bros import make
from gym_super_mario_bros.actions import SIMPLE_MOVEMENT
from keras.layers import Dense
from keras.optimizers import Adam
from keras.models import Sequential
from nes_py.wrappers import BinarySpaceToDiscreteSpaceEnv
from numpy import argmax, float32, re... | 1,762 | -9 | 180 |
0efaaa5c41af28e06aa9ef47e8193cf2105384cd | 403 | py | Python | inventory/migrations/0011_remove_inventory_inventory_str.py | nathandarnell/sal | 464414a2666e39bdf5b4b0033a84d5129c93c053 | [
"Apache-2.0"
] | 215 | 2015-05-04T16:57:56.000Z | 2022-03-07T12:58:12.000Z | inventory/migrations/0011_remove_inventory_inventory_str.py | nathandarnell/sal | 464414a2666e39bdf5b4b0033a84d5129c93c053 | [
"Apache-2.0"
] | 243 | 2015-07-04T18:10:56.000Z | 2022-02-27T18:52:40.000Z | inventory/migrations/0011_remove_inventory_inventory_str.py | nathandarnell/sal | 464414a2666e39bdf5b4b0033a84d5129c93c053 | [
"Apache-2.0"
] | 90 | 2015-06-29T19:26:58.000Z | 2022-02-17T19:03:00.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.10 on 2018-11-11 20:58
from __future__ import unicode_literals
from django.db import migrations
| 20.15 | 49 | 0.62531 | # -*- coding: utf-8 -*-
# Generated by Django 1.10 on 2018-11-11 20:58
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('inventory', '0010_auto_20180911_1154'),
]
operations = [
migrations.RemoveField(
... | 0 | 234 | 23 |
0b38a215c39708e2a747e53452c3310a688e1b45 | 1,699 | py | Python | pythonScripts/database_setup.py | jonathanplov/RealEstate | 0e40ae3588f03295fe7224fde6606fdc3e523518 | [
"MIT"
] | 1 | 2020-08-20T04:11:33.000Z | 2020-08-20T04:11:33.000Z | pythonScripts/database_setup.py | jonathanplov/RealEstate | 0e40ae3588f03295fe7224fde6606fdc3e523518 | [
"MIT"
] | null | null | null | pythonScripts/database_setup.py | jonathanplov/RealEstate | 0e40ae3588f03295fe7224fde6606fdc3e523518 | [
"MIT"
] | null | null | null | import mysql.connector
import re
| 27.852459 | 256 | 0.637434 | import mysql.connector
import re
def run():
SQLDatabaseList = []
tableList = []
databaseName = 'realestate'
"""First create localhost with SQL"""
databaseEstate = mysql.connector.connect(
host="localhost",
user="root",
passwd=""
)
databasecursor = database... | 1,635 | 0 | 25 |
db67e85adba0e157e91984e5c48f2a27af2354ce | 4,027 | py | Python | analyzers/rolaguard_base_analyzer/CheckSessionRegeneration.py | Argeniss-Software/rolaguard_engine | cec4af736097daae23864e6d7c4990a68f269f72 | [
"Apache-2.0"
] | null | null | null | analyzers/rolaguard_base_analyzer/CheckSessionRegeneration.py | Argeniss-Software/rolaguard_engine | cec4af736097daae23864e6d7c4990a68f269f72 | [
"Apache-2.0"
] | null | null | null | analyzers/rolaguard_base_analyzer/CheckSessionRegeneration.py | Argeniss-Software/rolaguard_engine | cec4af736097daae23864e6d7c4990a68f269f72 | [
"Apache-2.0"
] | null | null | null | from collections import defaultdict
import logging as log
from utils.AlertGenerator import emit_alert
from db.Models import DataCollector, Issue, AlertType
| 40.676768 | 101 | 0.563198 | from collections import defaultdict
import logging as log
from utils.AlertGenerator import emit_alert
from db.Models import DataCollector, Issue, AlertType
class CheckSessionRegeneration():
def __init__(self):
self.last_packet = defaultdict(lambda: {})
self.last_gc = None
def __call__(self,... | 3,752 | 12 | 103 |
c02aa2011a5ddf1c1f3331a1780e082ab985421f | 1,628 | py | Python | sneakers/tests/test_channels/test_twitter.py | michalkoczwara/sneaky-creeper | b398af8701d51b8b3a4baf37cdaa16de3d3649d1 | [
"MIT"
] | 1 | 2018-01-25T01:49:05.000Z | 2018-01-25T01:49:05.000Z | sneakers/tests/test_channels/test_twitter.py | michalkoczwara/sneaky-creeper | b398af8701d51b8b3a4baf37cdaa16de3d3649d1 | [
"MIT"
] | null | null | null | sneakers/tests/test_channels/test_twitter.py | michalkoczwara/sneaky-creeper | b398af8701d51b8b3a4baf37cdaa16de3d3649d1 | [
"MIT"
] | null | null | null | import unittest
import json
import random
import string
import os
from unittest.case import SkipTest
import twython
from sneakers.channels import twitter
import sneakers
basePath = os.path.dirname(os.path.abspath(sneakers.__file__))
| 29.071429 | 83 | 0.625921 | import unittest
import json
import random
import string
import os
from unittest.case import SkipTest
import twython
from sneakers.channels import twitter
import sneakers
basePath = os.path.dirname(os.path.abspath(sneakers.__file__))
class TwitterTest(unittest.TestCase):
def setUp(self):
configPath = os... | 1,273 | 16 | 104 |
810d4af35c3b44e3232d6b661d83ca36e5727414 | 8,081 | py | Python | app/api/crypto_api.py | 1c3be4r/Apfell | 3d577283cb0cb1ebb1ad75cd827949844e148fe4 | [
"BSD-3-Clause"
] | 1 | 2019-06-14T06:43:45.000Z | 2019-06-14T06:43:45.000Z | app/api/crypto_api.py | 1c3be4r/Apfell | 3d577283cb0cb1ebb1ad75cd827949844e148fe4 | [
"BSD-3-Clause"
] | null | null | null | app/api/crypto_api.py | 1c3be4r/Apfell | 3d577283cb0cb1ebb1ad75cd827949844e148fe4 | [
"BSD-3-Clause"
] | null | null | null | from app import apfell, db_objects
from sanic.response import raw, json
from app.database_models.model import StagingInfo
import base64
import app.crypto as crypt
import json as js
from app.api.callback_api import create_callback_func
import app.database_models.model as db_model
# this is an unprotected API so that a... | 53.516556 | 114 | 0.656973 | from app import apfell, db_objects
from sanic.response import raw, json
from app.database_models.model import StagingInfo
import base64
import app.crypto as crypt
import json as js
from app.api.callback_api import create_callback_func
import app.database_models.model as db_model
# this is an unprotected API so that a... | 7,293 | 0 | 66 |
514c69afe2edc3cffb6a6911c37fcef23eae7fde | 627 | py | Python | bin/index.py | gelin/geberdur.ru | 740a6f8c70e6c1e3152da11686290fd512ec52fa | [
"MIT"
] | null | null | null | bin/index.py | gelin/geberdur.ru | 740a6f8c70e6c1e3152da11686290fd512ec52fa | [
"MIT"
] | null | null | null | bin/index.py | gelin/geberdur.ru | 740a6f8c70e6c1e3152da11686290fd512ec52fa | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
"""
Renders index.html
"""
from mako.lookup import TemplateLookup
from pypugjs.ext.mako import preprocessor as pug_preprocessor
from libtales import Tales
if __name__ == '__main__':
main()
| 25.08 | 63 | 0.626794 | #!/usr/bin/env python3
"""
Renders index.html
"""
from mako.lookup import TemplateLookup
from pypugjs.ext.mako import preprocessor as pug_preprocessor
from libtales import Tales
def main():
print('Building index.html')
with open('build/index.html', 'wt') as htmlfile:
lookup = TemplateLookup(director... | 383 | 0 | 23 |
b2a7f63d3d92b43119289944f9e9c1c0e9b77ba5 | 183 | py | Python | kitesettings.py | vishalr4202/ZerodhaCode | bd75a49525a66d2640a5dc40c708484b66ce14b5 | [
"MIT"
] | null | null | null | kitesettings.py | vishalr4202/ZerodhaCode | bd75a49525a66d2640a5dc40c708484b66ce14b5 | [
"MIT"
] | null | null | null | kitesettings.py | vishalr4202/ZerodhaCode | bd75a49525a66d2640a5dc40c708484b66ce14b5 | [
"MIT"
] | 1 | 2022-03-02T00:32:37.000Z | 2022-03-02T00:32:37.000Z |
API_KEY = "2nqrb7e20f9gy2mp"
api_secret = "24hppoib99gudt5t4glq7yw5m9dr29ax"
# ====================================================
access_token = "GSzV0EA2hdw0ptoCqwz2Cn3Qpz7kBlRI"
| 30.5 | 54 | 0.595628 |
API_KEY = "2nqrb7e20f9gy2mp"
api_secret = "24hppoib99gudt5t4glq7yw5m9dr29ax"
# ====================================================
access_token = "GSzV0EA2hdw0ptoCqwz2Cn3Qpz7kBlRI"
| 0 | 0 | 0 |
893952026fd0c306167e0228a4a1175e93a6ae27 | 2,661 | py | Python | qt_binder/tests/test_lazy_registry.py | Qt-Widgets/qt_binding-traits | 16c7a9ee439ff35d4d027c797ae1d05453a5fc06 | [
"BSD-3-Clause"
] | 15 | 2015-09-02T11:16:50.000Z | 2021-06-24T04:00:52.000Z | qt_binder/tests/test_lazy_registry.py | Qt-Widgets/qt_binding-traits | 16c7a9ee439ff35d4d027c797ae1d05453a5fc06 | [
"BSD-3-Clause"
] | 54 | 2015-09-02T10:45:49.000Z | 2020-11-30T13:01:05.000Z | qt_binder/tests/test_lazy_registry.py | Qt-Widgets/qt_binding-traits | 16c7a9ee439ff35d4d027c797ae1d05453a5fc06 | [
"BSD-3-Clause"
] | 3 | 2015-09-16T17:23:50.000Z | 2016-07-23T05:35:55.000Z | #------------------------------------------------------------------------------
#
# Copyright (c) 2014-2015, Enthought, Inc.
# All rights reserved.
#
# This software is provided without warranty under the terms of the BSD
# license included in LICENSE.txt and may be redistributed only
# under the conditions descri... | 42.238095 | 79 | 0.640361 | #------------------------------------------------------------------------------
#
# Copyright (c) 2014-2015, Enthought, Inc.
# All rights reserved.
#
# This software is provided without warranty under the terms of the BSD
# license included in LICENSE.txt and may be redistributed only
# under the conditions descri... | 1,750 | 21 | 184 |
2eaa77bfb0b3d202c8752249781678e6703daf63 | 4,065 | py | Python | enc_t5/tokenization_enc_t5.py | monologg/EncT5 | 7008110d6a8ffcb09f3d71881d6d9c647bc384e3 | [
"Apache-2.0"
] | 34 | 2022-01-22T06:50:55.000Z | 2022-03-21T09:00:47.000Z | enc_t5/tokenization_enc_t5.py | monologg/EncT5 | 7008110d6a8ffcb09f3d71881d6d9c647bc384e3 | [
"Apache-2.0"
] | null | null | null | enc_t5/tokenization_enc_t5.py | monologg/EncT5 | 7008110d6a8ffcb09f3d71881d6d9c647bc384e3 | [
"Apache-2.0"
] | null | null | null | from typing import Any, Dict, List, Optional
from transformers import T5Tokenizer
| 40.65 | 119 | 0.597786 | from typing import Any, Dict, List, Optional
from transformers import T5Tokenizer
class EncT5Tokenizer(T5Tokenizer):
def __init__(
self,
vocab_file,
bos_token="<s>",
eos_token="</s>",
unk_token="<unk>",
pad_token="<pad>",
extra_ids=100,
additional_s... | 731 | 3,227 | 23 |
4a4e013da990793b7f325b9115352d6f24122139 | 1,609 | py | Python | tests/adapters/compliance_tests/remove_vlan_test.py | FrancoisLopez/netman | a40d3235f7ea0cdaf52daab97b0d5ad20857b00e | [
"Apache-2.0"
] | 38 | 2015-11-30T10:11:42.000Z | 2022-02-10T18:31:44.000Z | tests/adapters/compliance_tests/remove_vlan_test.py | FrancoisLopez/netman | a40d3235f7ea0cdaf52daab97b0d5ad20857b00e | [
"Apache-2.0"
] | 143 | 2015-12-10T19:00:42.000Z | 2020-08-20T13:51:42.000Z | tests/adapters/compliance_tests/remove_vlan_test.py | FrancoisLopez/netman | a40d3235f7ea0cdaf52daab97b0d5ad20857b00e | [
"Apache-2.0"
] | 15 | 2015-12-14T23:03:30.000Z | 2019-01-15T19:35:45.000Z | # Copyright 2019 Internap.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, so... | 33.520833 | 75 | 0.734618 | # Copyright 2019 Internap.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, so... | 663 | 183 | 23 |
ca4fdcea316887d3b7795c3d909ef75ccd95f5f9 | 1,788 | py | Python | Python/Encrypt credentials/Encryption sample/services/datavalidationservice.py | AdamRiddick/PowerBI-Developer-Samples | 4032ffd63f7e3133c2320d23dbdb0e7fbb782a37 | [
"MIT"
] | 611 | 2019-05-09T04:56:36.000Z | 2022-03-28T07:48:57.000Z | Python/Encrypt credentials/Encryption sample/services/datavalidationservice.py | AdamRiddick/PowerBI-Developer-Samples | 4032ffd63f7e3133c2320d23dbdb0e7fbb782a37 | [
"MIT"
] | 56 | 2017-03-06T12:05:26.000Z | 2019-04-29T22:52:29.000Z | Python/Encrypt credentials/Encryption sample/services/datavalidationservice.py | AdamRiddick/PowerBI-Developer-Samples | 4032ffd63f7e3133c2320d23dbdb0e7fbb782a37 | [
"MIT"
] | 599 | 2019-05-08T07:01:04.000Z | 2022-03-29T21:45:55.000Z | # Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
| 31.928571 | 135 | 0.599553 | # Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
class DataValidationService:
def validate_creds(self, data):
''' Validates data for all the functionalities
Args:
data (dict): data
'''
cred_type = data['credType']
if not data['credenti... | 0 | 1,691 | 23 |
15cb44a8d9df07f16eb786b3c1b729a4214ecca1 | 7,566 | py | Python | pkg/SessionRecordWrapper.py | falouu/el4000 | 2ec0472ef259519173bc755765abb5a0199e9978 | [
"MIT"
] | null | null | null | pkg/SessionRecordWrapper.py | falouu/el4000 | 2ec0472ef259519173bc755765abb5a0199e9978 | [
"MIT"
] | null | null | null | pkg/SessionRecordWrapper.py | falouu/el4000 | 2ec0472ef259519173bc755765abb5a0199e9978 | [
"MIT"
] | null | null | null | from datetime import datetime
from pkg.statistics import get_avg, get_percentiles
from pkg import all_data_file
| 32.612069 | 119 | 0.697595 | from datetime import datetime
from pkg.statistics import get_avg, get_percentiles
from pkg import all_data_file
class SessionRecordWrapper:
FIELDS = [
"session_type",
"start",
"end",
"duration_minutes",
"effective_power_p10",
"effective_power_p50",
"effecti... | 5,176 | 2,254 | 23 |
988c0354ce8a272af50a8b6bc48de537ca761473 | 255 | py | Python | experiments/mito-em/challenge/pretty_print_table.py | JonasHell/torch-em | 2e008e0cd2f0ea6681581374fce4f9f47b986d55 | [
"MIT"
] | 13 | 2021-03-09T21:31:09.000Z | 2022-03-21T05:24:26.000Z | experiments/mito-em/challenge/pretty_print_table.py | JonasHell/torch-em | 2e008e0cd2f0ea6681581374fce4f9f47b986d55 | [
"MIT"
] | 16 | 2021-03-02T23:19:34.000Z | 2022-03-25T19:43:41.000Z | experiments/mito-em/challenge/pretty_print_table.py | JonasHell/torch-em | 2e008e0cd2f0ea6681581374fce4f9f47b986d55 | [
"MIT"
] | 4 | 2021-05-18T08:29:33.000Z | 2022-02-11T12:16:20.000Z | import argparse
import pandas as pd
parser = argparse.ArgumentParser()
parser.add_argument('--path', '-p', default='./validation_results.csv')
args = parser.parse_args()
path = args.path
df = pd.read_csv(path)
md = df.to_markdown(index=False)
print(md)
| 21.25 | 71 | 0.741176 | import argparse
import pandas as pd
parser = argparse.ArgumentParser()
parser.add_argument('--path', '-p', default='./validation_results.csv')
args = parser.parse_args()
path = args.path
df = pd.read_csv(path)
md = df.to_markdown(index=False)
print(md)
| 0 | 0 | 0 |
2cf6cda87d1ef3f473b9900326ece3c85de16c52 | 4,426 | py | Python | enviro-collectd.py | telescreen/raspizero-playground | 8ef3fb2c392131dac160e5489d8c30d7940ebfc5 | [
"Apache-2.0"
] | null | null | null | enviro-collectd.py | telescreen/raspizero-playground | 8ef3fb2c392131dac160e5489d8c30d7940ebfc5 | [
"Apache-2.0"
] | null | null | null | enviro-collectd.py | telescreen/raspizero-playground | 8ef3fb2c392131dac160e5489d8c30d7940ebfc5 | [
"Apache-2.0"
] | null | null | null | import random
import time
import os
import signal
import sys
import logging
import argparse
import envirophat
from prometheus_client import Gauge, start_http_server
def _daemonize(pid_file, func, *args):
"""Call func in child process"""
pid = os.fork()
if pid > 0: # Main process
with open(pid_fil... | 37.82906 | 119 | 0.657479 | import random
import time
import os
import signal
import sys
import logging
import argparse
import envirophat
from prometheus_client import Gauge, start_http_server
def _daemonize(pid_file, func, *args):
"""Call func in child process"""
pid = os.fork()
if pid > 0: # Main process
with open(pid_fil... | 1,601 | 467 | 23 |
faa407f67ff777a6c375a9804176c6a822f8d252 | 3,032 | py | Python | anadroid/results_analysis/AbstractAnalyzer.py | greensoftwarelab/PyAnaDroid | c37a85a2c8e0206895f2e96d28c2baa045f6a211 | [
"MIT"
] | null | null | null | anadroid/results_analysis/AbstractAnalyzer.py | greensoftwarelab/PyAnaDroid | c37a85a2c8e0206895f2e96d28c2baa045f6a211 | [
"MIT"
] | 2 | 2022-03-31T17:33:48.000Z | 2022-03-31T17:38:22.000Z | anadroid/results_analysis/AbstractAnalyzer.py | greensoftwarelab/PyAnaDroid | c37a85a2c8e0206895f2e96d28c2baa045f6a211 | [
"MIT"
] | null | null | null | import os
from abc import ABC, abstractmethod
from anadroid.device.DeviceState import get_known_state_keys, DeviceState
from anadroid.results_analysis.filters.Filters import Filters
from anadroid.utils.Utils import get_resources_dir
DEFAULT_CFG_ANALYZERS_FILE = os.path.join(get_resources_dir(), "config", "analyzer_f... | 32.255319 | 115 | 0.658641 | import os
from abc import ABC, abstractmethod
from anadroid.device.DeviceState import get_known_state_keys, DeviceState
from anadroid.results_analysis.filters.Filters import Filters
from anadroid.utils.Utils import get_resources_dir
DEFAULT_CFG_ANALYZERS_FILE = os.path.join(get_resources_dir(), "config", "analyzer_f... | 415 | 0 | 78 |
afac2ebef8abd79066c3866c511c037dce81eec4 | 1,260 | py | Python | proxy/core/work/remote.py | fisabiliyusri/proxy | 29934503251b704813ef3e7ed8c2a5ae69448c8a | [
"BSD-3-Clause"
] | null | null | null | proxy/core/work/remote.py | fisabiliyusri/proxy | 29934503251b704813ef3e7ed8c2a5ae69448c8a | [
"BSD-3-Clause"
] | 8 | 2022-01-23T10:51:59.000Z | 2022-03-29T22:11:57.000Z | proxy/core/work/remote.py | fisabiliyusri/proxy | 29934503251b704813ef3e7ed8c2a5ae69448c8a | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""
proxy.py
~~~~~~~~
⚡⚡⚡ Fast, Lightweight, Pluggable, TLS interception capable proxy server focused on
Network monitoring, controls & Application development, testing, debugging.
:copyright: (c) 2013-present by Abhinav Singh and contributors.
:license: BSD, see LICENSE... | 31.5 | 86 | 0.688889 | # -*- coding: utf-8 -*-
"""
proxy.py
~~~~~~~~
⚡⚡⚡ Fast, Lightweight, Pluggable, TLS interception capable proxy server focused on
Network monitoring, controls & Application development, testing, debugging.
:copyright: (c) 2013-present by Abhinav Singh and contributors.
:license: BSD, see LICENSE... | 496 | 0 | 134 |
650e791991ee706ef222f34f63589ac7278447c7 | 1,278 | py | Python | deivces.py | caseymorris87/pynet_test | 8c253f3ee4ad30a545252ead918fd29b04aae763 | [
"Apache-2.0"
] | null | null | null | deivces.py | caseymorris87/pynet_test | 8c253f3ee4ad30a545252ead918fd29b04aae763 | [
"Apache-2.0"
] | null | null | null | deivces.py | caseymorris87/pynet_test | 8c253f3ee4ad30a545252ead918fd29b04aae763 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
cisco_dev1 = {'device_type': 'cisco_ios',
'ip': '184.105.247.70',
'username': 'pyclass'
'password': '88newclass'}
cisco_dev2 = {'device_type': 'cisco_ios',
'ip': '184.105.247.71',
'username': 'pyclass'
'password': '88n... | 28.4 | 47 | 0.500782 | #!/usr/bin/env python
cisco_dev1 = {'device_type': 'cisco_ios',
'ip': '184.105.247.70',
'username': 'pyclass'
'password': '88newclass'}
cisco_dev2 = {'device_type': 'cisco_ios',
'ip': '184.105.247.71',
'username': 'pyclass'
'password': '88n... | 0 | 0 | 0 |
b9b6aad5a709a81908f28201d8bf7fbd66fffecd | 2,361 | py | Python | samples/make_feed.py | ZoomTen/MDiocre | c0a35938d09b22712f0c2b426e7083c68173c7b6 | [
"MIT"
] | 2 | 2021-07-19T21:56:51.000Z | 2022-01-26T14:36:59.000Z | samples/make_feed.py | ZoomTen/MDiocre | c0a35938d09b22712f0c2b426e7083c68173c7b6 | [
"MIT"
] | null | null | null | samples/make_feed.py | ZoomTen/MDiocre | c0a35938d09b22712f0c2b426e7083c68173c7b6 | [
"MIT"
] | 1 | 2021-01-11T15:26:10.000Z | 2021-01-11T15:26:10.000Z | '''
Create an RSS feed
'''
import os
import sys
# point this to the folder where mdiocre.py is located
sys.path.append(os.path.abspath('..'))
from mdiocre.core import MDiocre
from mdiocre.wizard import Wizard
from feedgen import feed
import datetime
# directory where the blog files are
BLOG_DIR = "source/blog"
WEBS... | 26.52809 | 68 | 0.690809 | '''
Create an RSS feed
'''
import os
import sys
# point this to the folder where mdiocre.py is located
sys.path.append(os.path.abspath('..'))
from mdiocre.core import MDiocre
from mdiocre.wizard import Wizard
from feedgen import feed
import datetime
# directory where the blog files are
BLOG_DIR = "source/blog"
WEBS... | 0 | 0 | 0 |
b8a86b4a6538a6992a168d3194a22f85e44387a1 | 13,213 | py | Python | framework/SupervisedLearning/ScikitLearn/LinearModel/SGDRegressor.py | FlanFlanagan/raven | bd7fca18af94376a28e2144ba1da72c01c8d343c | [
"Apache-2.0"
] | 1 | 2022-03-10T18:54:09.000Z | 2022-03-10T18:54:09.000Z | framework/SupervisedLearning/ScikitLearn/LinearModel/SGDRegressor.py | FlanFlanagan/raven | bd7fca18af94376a28e2144ba1da72c01c8d343c | [
"Apache-2.0"
] | null | null | null | framework/SupervisedLearning/ScikitLearn/LinearModel/SGDRegressor.py | FlanFlanagan/raven | bd7fca18af94376a28e2144ba1da72c01c8d343c | [
"Apache-2.0"
] | null | null | null | # Copyright 2017 Battelle Energy Alliance, LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed t... | 82.58125 | 194 | 0.56452 | # Copyright 2017 Battelle Energy Alliance, LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed t... | 0 | 0 | 0 |
7b6a64801007763d9c802f8186b2ba1234854a67 | 12,992 | py | Python | type_erasure/handle_interface_generator.py | lubkoll/friendly-type-erasure | 719830233a8652ccf18164653b466b0054a617f6 | [
"MIT"
] | null | null | null | type_erasure/handle_interface_generator.py | lubkoll/friendly-type-erasure | 719830233a8652ccf18164653b466b0054a617f6 | [
"MIT"
] | 22 | 2016-08-03T16:51:10.000Z | 2016-11-23T20:53:03.000Z | type_erasure/handle_interface_generator.py | lubkoll/friendly-type-erasure | 719830233a8652ccf18164653b466b0054a617f6 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import code
import cpp
import cpp_file_parser
import file_parser
import parser_addition
import to_string
import util
import os
| 47.072464 | 127 | 0.627463 | #!/usr/bin/env python
import code
import cpp
import cpp_file_parser
import file_parser
import parser_addition
import to_string
import util
import os
def add_aliases(data, scope, detail_namespace):
if data.small_buffer_optimization:
buffer = 'using Buffer = std :: array < char , ' + data.buffer + ' > ;'
... | 12,325 | 43 | 460 |
13032ec06428a86d136f58c2323d812fe37331b8 | 1,516 | py | Python | train_baseline_test.py | k402xxxcenxxx/TetrisBattle | 1cba803958c3856b138a3eadd94554f5a32651b2 | [
"MIT"
] | null | null | null | train_baseline_test.py | k402xxxcenxxx/TetrisBattle | 1cba803958c3856b138a3eadd94554f5a32651b2 | [
"MIT"
] | null | null | null | train_baseline_test.py | k402xxxcenxxx/TetrisBattle | 1cba803958c3856b138a3eadd94554f5a32651b2 | [
"MIT"
] | null | null | null |
import os
import gym
from stable_baselines.common.policies import MlpPolicy
from stable_baselines import PPO2
from stable_baselines.common import make_vec_env
from TetrisBattle.envs.tetris_env import TetrisSingleEnv
# load env var
CASE_NAME = get_var_from_env("CASE_NAME", "ppo2_tetris_test")
TRAIN_STEPS = int(floa... | 32.956522 | 125 | 0.773087 |
import os
import gym
from stable_baselines.common.policies import MlpPolicy
from stable_baselines import PPO2
from stable_baselines.common import make_vec_env
from TetrisBattle.envs.tetris_env import TetrisSingleEnv
# load env var
def get_var_from_env(name, default=""):
return os.getenv(name) if os.getenv(name)... | 85 | 0 | 22 |
a2814b8a4e1d997f2a6d4f0d37c8e5c56de6282d | 405 | py | Python | src/test/resources/ProxyRef/apiproxy/resources/py/createURL.py | swilliams11/proxy-dependency-maven-plugin-accenture | 50d73720f8d3fccc9d9b50a66ea4298d5566b88b | [
"BSD-2-Clause"
] | null | null | null | src/test/resources/ProxyRef/apiproxy/resources/py/createURL.py | swilliams11/proxy-dependency-maven-plugin-accenture | 50d73720f8d3fccc9d9b50a66ea4298d5566b88b | [
"BSD-2-Clause"
] | null | null | null | src/test/resources/ProxyRef/apiproxy/resources/py/createURL.py | swilliams11/proxy-dependency-maven-plugin-accenture | 50d73720f8d3fccc9d9b50a66ea4298d5566b88b | [
"BSD-2-Clause"
] | null | null | null | import hmac
from hashlib import sha1
from sys import argv
from time import time
from datetime import date
storeurl = flow.getVariable("Url")
expirytime = flow.getVariable("expirytime")
containerName = flow.getVariable("containerName")
date_now = str(date.today().isoformat())
url = storeurl + '/' + containerName +... | 22.5 | 85 | 0.740741 | import hmac
from hashlib import sha1
from sys import argv
from time import time
from datetime import date
storeurl = flow.getVariable("Url")
expirytime = flow.getVariable("expirytime")
containerName = flow.getVariable("containerName")
date_now = str(date.today().isoformat())
url = storeurl + '/' + containerName +... | 0 | 0 | 0 |
a476a62c427098a22bd6fc72104b84553ca5a7c0 | 334 | py | Python | friend/__init__.py | ace-han/onedegree | ffa30c518a0035509289c36e70316c1b660df3fd | [
"BSD-3-Clause"
] | null | null | null | friend/__init__.py | ace-han/onedegree | ffa30c518a0035509289c36e70316c1b660df3fd | [
"BSD-3-Clause"
] | 2 | 2015-10-27T10:12:36.000Z | 2015-11-01T05:21:06.000Z | friend/__init__.py | ace-han/onedegree | ffa30c518a0035509289c36e70316c1b660df3fd | [
"BSD-3-Clause"
] | null | null | null | # due to phone contact is bound to profile since we need preload phone contact data from some nasty way
# which means I have to bind PhoneContact to Profile
# which means this friend app should have be a child app in the account app
# friend module has many logic based on account app...
# which means I prefer profileId... | 66.8 | 103 | 0.781437 | # due to phone contact is bound to profile since we need preload phone contact data from some nasty way
# which means I have to bind PhoneContact to Profile
# which means this friend app should have be a child app in the account app
# friend module has many logic based on account app...
# which means I prefer profileId... | 0 | 0 | 0 |
53c8c2e33c390c6a691b365d5d8bd0ba6efcb269 | 878 | py | Python | test/run_tests_common.py | aaiyer/vowpal_wabbit | 1cd338a3b8ba0848684f67b99d9fcd7a97393023 | [
"BSD-3-Clause"
] | 4,332 | 2015-01-01T10:26:51.000Z | 2018-10-01T14:05:43.000Z | test/run_tests_common.py | chrinide/vowpal_wabbit | 40e1fef676ca6a461d71cf0631ab5c63d1af5d8a | [
"BSD-3-Clause"
] | 1,153 | 2018-10-01T22:19:53.000Z | 2022-03-31T19:10:56.000Z | test/run_tests_common.py | chrinide/vowpal_wabbit | 40e1fef676ca6a461d71cf0631ab5c63d1af5d8a | [
"BSD-3-Clause"
] | 1,182 | 2015-01-02T20:38:55.000Z | 2018-09-26T02:47:37.000Z | from typing import Dict, List, Optional
| 23.72973 | 48 | 0.61959 | from typing import Dict, List, Optional
class TestData:
id: int
depends_on: List[int]
command_line: str
# Helper member for flatbuffer conversion
stashed_command_line: Optional[str] = None
is_shell: bool
input_files: List[str]
comparison_files: Dict[str, str]
skip: bool
skip_re... | 511 | 303 | 23 |
4a69ac69a6128eb74ef86491513402c65feae3cf | 4,467 | py | Python | src/simple_playgrounds/element/elements/edible.py | embaba/simple-playgrounds | 74225a032cc20ad83ae1ce39811b1fde29e44cc4 | [
"MIT"
] | 12 | 2022-01-13T09:33:49.000Z | 2022-02-10T12:10:51.000Z | src/simple_playgrounds/element/elements/edible.py | embaba/simple-playgrounds | 74225a032cc20ad83ae1ce39811b1fde29e44cc4 | [
"MIT"
] | 31 | 2020-07-19T21:47:02.000Z | 2021-11-11T23:09:18.000Z | src/simple_playgrounds/element/elements/edible.py | embaba/simple-playgrounds | 74225a032cc20ad83ae1ce39811b1fde29e44cc4 | [
"MIT"
] | 4 | 2020-11-03T17:38:52.000Z | 2021-09-02T12:04:26.000Z | """
Module for Edible SceneElement
"""
from abc import ABC
from typing import Optional, Union
from ..element import InteractiveElement
from ...common.definitions import ElementTypes, CollisionTypes
from ...configs.parser import parse_configuration
# pylint: disable=line-too-long
class Edible(InteractiveElement, AB... | 29.78 | 117 | 0.591448 | """
Module for Edible SceneElement
"""
from abc import ABC
from typing import Optional, Union
from ..element import InteractiveElement
from ...common.definitions import ElementTypes, CollisionTypes
from ...configs.parser import parse_configuration
# pylint: disable=line-too-long
class Edible(InteractiveElement, AB... | 2,132 | 0 | 132 |
4e92b5fb3f1bb72370f537d0cce7033a403cccf9 | 416 | py | Python | amis_py/utils/__init__.py | bstr9/amis-py | 3af6266e4d1d8574957662af92640a734603b198 | [
"Apache-2.0"
] | 1 | 2022-02-24T04:07:53.000Z | 2022-02-24T04:07:53.000Z | amis_py/utils/__init__.py | bstr9/amis-py | 3af6266e4d1d8574957662af92640a734603b198 | [
"Apache-2.0"
] | null | null | null | amis_py/utils/__init__.py | bstr9/amis-py | 3af6266e4d1d8574957662af92640a734603b198 | [
"Apache-2.0"
] | null | null | null | import hashlib
import random
| 21.894737 | 53 | 0.663462 | import hashlib
import random
def is_default(value, default):
if value is None and default is None:
return True
if value == default:
return True
return False
def get_random_hash(length=6):
res = ""
chars = "abcdefghijklmnopqrstuvwsxy0123456789"
for _ in range(length):
... | 339 | 0 | 46 |
0da73efa90ab01f06cfd6e88fa040803be07537a | 78 | py | Python | examples/monitor_size.py | AlexCaranha/MyLauncher | d15037d5e26eee61e851a938b432ee1107f441ab | [
"MIT"
] | null | null | null | examples/monitor_size.py | AlexCaranha/MyLauncher | d15037d5e26eee61e851a938b432ee1107f441ab | [
"MIT"
] | null | null | null | examples/monitor_size.py | AlexCaranha/MyLauncher | d15037d5e26eee61e851a938b432ee1107f441ab | [
"MIT"
] | null | null | null | import pyautogui
width, height= pyautogui.size()
print(f"{width} x {height}") | 19.5 | 31 | 0.730769 | import pyautogui
width, height= pyautogui.size()
print(f"{width} x {height}") | 0 | 0 | 0 |
ab87bf86d307cad4690613f2f7faea24b11fec32 | 20,176 | py | Python | pyhealth/models/ecg/mina.py | Abhinav43/PyHealth | 5aa9816f76990d221d79340b331c18dfa10adcb3 | [
"BSD-2-Clause"
] | 485 | 2020-08-03T20:04:21.000Z | 2022-02-25T13:35:43.000Z | pyhealth/models/ecg/mina.py | Abhinav43/PyHealth | 5aa9816f76990d221d79340b331c18dfa10adcb3 | [
"BSD-2-Clause"
] | 6 | 2020-08-06T01:07:45.000Z | 2021-10-15T21:49:42.000Z | pyhealth/models/ecg/mina.py | Abhinav43/PyHealth | 5aa9816f76990d221d79340b331c18dfa10adcb3 | [
"BSD-2-Clause"
] | 98 | 2020-08-04T01:04:38.000Z | 2022-02-09T10:36:03.000Z | # -*- coding: utf-8 -*-
# License: BSD 2 clause
import os
import torch
import torch.nn as nn
import pickle
import warnings
import torchvision.models as models
from ._loss import callLoss
from ._dlbase import BaseControler
from pyhealth.data.data_reader.ecg import mina_reader
from collections import OrderedDict
from t... | 37.2939 | 167 | 0.521213 | # -*- coding: utf-8 -*-
# License: BSD 2 clause
import os
import torch
import torch.nn as nn
import pickle
import warnings
import torchvision.models as models
from ._loss import callLoss
from ._dlbase import BaseControler
from pyhealth.data.data_reader.ecg import mina_reader
from collections import OrderedDict
from t... | 6,293 | 13,201 | 195 |
6c6657412d1b820baa78e940f2e0d47a3e1f00b1 | 804 | py | Python | weixin/weixin_localtest.py | mannuan/pyspider_script | f4c988912e1099eacd0322b4e9c3a87eaaaa526f | [
"Apache-2.0"
] | 9 | 2018-08-28T07:53:43.000Z | 2019-07-09T07:55:52.000Z | weixin/weixin_localtest.py | mannuan/pyspider_script | f4c988912e1099eacd0322b4e9c3a87eaaaa526f | [
"Apache-2.0"
] | null | null | null | weixin/weixin_localtest.py | mannuan/pyspider_script | f4c988912e1099eacd0322b4e9c3a87eaaaa526f | [
"Apache-2.0"
] | null | null | null | # -*- coding:utf-8 -*-
from selenium import webdriver
import time,json
driver = webdriver.Chrome()
driver.get('https://www.baidu.com')
driver.find_element_by_xpath('//*[@id="account"]').clear()
driver.find_element_by_xpath('//*[@id="account"]').send_keys('1192328490@qq.com')
time.sleep(2)
driver.find_element_by_xpath... | 27.724138 | 81 | 0.695274 | # -*- coding:utf-8 -*-
from selenium import webdriver
import time,json
driver = webdriver.Chrome()
driver.get('https://www.baidu.com')
driver.find_element_by_xpath('//*[@id="account"]').clear()
driver.find_element_by_xpath('//*[@id="account"]').send_keys('1192328490@qq.com')
time.sleep(2)
driver.find_element_by_xpath... | 0 | 0 | 0 |
d416164b23b66b95cbded517405c0ce444c232fe | 1,568 | py | Python | polling_stations/apps/data_collection/management/commands/import_hillingdon.py | mtravis/UK-Polling-Stations | 26e0331dc29253dc436a0462ffaa01e974c5dc52 | [
"BSD-3-Clause"
] | null | null | null | polling_stations/apps/data_collection/management/commands/import_hillingdon.py | mtravis/UK-Polling-Stations | 26e0331dc29253dc436a0462ffaa01e974c5dc52 | [
"BSD-3-Clause"
] | null | null | null | polling_stations/apps/data_collection/management/commands/import_hillingdon.py | mtravis/UK-Polling-Stations | 26e0331dc29253dc436a0462ffaa01e974c5dc52 | [
"BSD-3-Clause"
] | null | null | null | from data_collection.management.commands import BaseXpressDemocracyClubCsvImporter
| 32 | 82 | 0.594388 | from data_collection.management.commands import BaseXpressDemocracyClubCsvImporter
class Command(BaseXpressDemocracyClubCsvImporter):
council_id = "E09000017"
addresses_name = (
"local.2018-05-03/Version 1/Democracy_Club__03May2018 (3) Hillingdon.tsv"
)
stations_name = (
"local.2018-05... | 1,093 | 368 | 23 |
5a70d34c87a7158979178d2a1efbb7f7545f91af | 41 | py | Python | AutoClean/__init__.py | elisemercury/AutoClean | 9ad8c59e77ab594452820af753d87ae8b4d1e626 | [
"MIT"
] | 1 | 2022-03-30T09:12:28.000Z | 2022-03-30T09:12:28.000Z | AutoClean/__init__.py | elisemercury/AutoClean | 9ad8c59e77ab594452820af753d87ae8b4d1e626 | [
"MIT"
] | null | null | null | AutoClean/__init__.py | elisemercury/AutoClean | 9ad8c59e77ab594452820af753d87ae8b4d1e626 | [
"MIT"
] | null | null | null | from AutoClean.AutoClean import AutoClean | 41 | 41 | 0.902439 | from AutoClean.AutoClean import AutoClean | 0 | 0 | 0 |
87182a3a63cc17da72e3271667727c3ec56cca45 | 3,998 | py | Python | scripts/terraform_utils/modules_utils.py | mach10/jenkins | 0447942ffed6c92cc532ac81d784656bd5c81969 | [
"Apache-2.0"
] | null | null | null | scripts/terraform_utils/modules_utils.py | mach10/jenkins | 0447942ffed6c92cc532ac81d784656bd5c81969 | [
"Apache-2.0"
] | null | null | null | scripts/terraform_utils/modules_utils.py | mach10/jenkins | 0447942ffed6c92cc532ac81d784656bd5c81969 | [
"Apache-2.0"
] | null | null | null | import json
import os
import hcl
import sh
| 29.614815 | 95 | 0.647574 | import json
import os
import hcl
import sh
def get_terraform_modules(terraform_module_file):
with open(terraform_module_file, 'r') as fp:
modules_tf = hcl.load(fp)
return modules_tf['module'].keys()
def get_module_paths(terraform_module_file):
with open(terraform_module_file, 'r') as fp:
... | 3,595 | 0 | 345 |
fb59a03974c3a7b67ba4cbdecd5b6659ec601bc0 | 726 | py | Python | var/spack/repos/builtin/packages/tramonto/package.py | player1537-forks/spack | 822b7632222ec5a91dc7b7cda5fc0e08715bd47c | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 11 | 2015-10-04T02:17:46.000Z | 2018-02-07T18:23:00.000Z | var/spack/repos/builtin/packages/tramonto/package.py | player1537-forks/spack | 822b7632222ec5a91dc7b7cda5fc0e08715bd47c | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 22 | 2017-08-01T22:45:10.000Z | 2022-03-10T07:46:31.000Z | var/spack/repos/builtin/packages/tramonto/package.py | player1537-forks/spack | 822b7632222ec5a91dc7b7cda5fc0e08715bd47c | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 4 | 2016-06-10T17:57:39.000Z | 2018-09-11T04:59:38.000Z | # Copyright 2013-2022 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class Tramonto(CMakePackage):
"""Tramonto: Software for Nanostructured Fluids in Materials and B... | 29.04 | 79 | 0.665289 | # Copyright 2013-2022 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class Tramonto(CMakePackage):
"""Tramonto: Software for Nanostructured Fluids in Materials and B... | 178 | 0 | 27 |
349227e487faab9303a8f5407ef92bbe092e34b9 | 2,688 | py | Python | tests/test_animation_broken.py | wizardhead/pytti-core | 6030f6154ad7d17b93cf76e2d42905d4231a0abd | [
"MIT"
] | 1 | 2022-03-31T19:25:07.000Z | 2022-03-31T19:25:07.000Z | tests/test_animation_broken.py | wizardhead/pytti-core | 6030f6154ad7d17b93cf76e2d42905d4231a0abd | [
"MIT"
] | null | null | null | tests/test_animation_broken.py | wizardhead/pytti-core | 6030f6154ad7d17b93cf76e2d42905d4231a0abd | [
"MIT"
] | null | null | null | """
Trying to construct test case to reproduce
https://github.com/pytti-tools/pytti-core/issues/82
"""
from omegaconf import OmegaConf
from pytti.workhorse import _main as render_frames
from pathlib import Path
video_fpath = str(next(Path(".").glob("**/assets/*.mp4")))
print(video_fpath)
params = {
# "scenes": ... | 27.151515 | 77 | 0.622396 | """
Trying to construct test case to reproduce
https://github.com/pytti-tools/pytti-core/issues/82
"""
from omegaconf import OmegaConf
from pytti.workhorse import _main as render_frames
from pathlib import Path
video_fpath = str(next(Path(".").glob("**/assets/*.mp4")))
print(video_fpath)
params = {
# "scenes": ... | 0 | 0 | 0 |
ed5963b544a588facff2d43cae62aba1b88977f8 | 2,106 | py | Python | affiliates/facebook/urls.py | glogiotatidis/affiliates | 34d0ded8e24be9dd207d6419a5157dc8ce34bc06 | [
"BSD-3-Clause"
] | 15 | 2015-01-01T07:17:44.000Z | 2020-11-09T06:28:29.000Z | affiliates/facebook/urls.py | glogiotatidis/affiliates | 34d0ded8e24be9dd207d6419a5157dc8ce34bc06 | [
"BSD-3-Clause"
] | 16 | 2015-02-25T23:17:27.000Z | 2015-08-20T10:28:18.000Z | affiliates/facebook/urls.py | glogiotatidis/affiliates | 34d0ded8e24be9dd207d6419a5157dc8ce34bc06 | [
"BSD-3-Clause"
] | 12 | 2015-01-17T20:57:03.000Z | 2019-11-03T15:04:31.000Z | from django.conf.urls import patterns, url
from affiliates.facebook import views
from affiliates.base.views import handler404, handler500
urlpatterns = patterns('affiliates.facebook.views',
url(r'^/?$', views.load_app, name='facebook.load_app'),
url(r'^pre_auth/?$', views.pre_auth_promo, name='facebook.pre_... | 32.90625 | 85 | 0.657645 | from django.conf.urls import patterns, url
from affiliates.facebook import views
from affiliates.base.views import handler404, handler500
urlpatterns = patterns('affiliates.facebook.views',
url(r'^/?$', views.load_app, name='facebook.load_app'),
url(r'^pre_auth/?$', views.pre_auth_promo, name='facebook.pre_... | 0 | 0 | 0 |
8f75949a5df70b5842a6af89c48b5fc34fce6743 | 1,067 | py | Python | tests/test_when_configuring_ravenpy_session.py | WenLogic/ravendb-py | 44239b02f3b9c1753fe70762e746c49bed552651 | [
"MIT"
] | 6 | 2015-10-08T11:15:03.000Z | 2016-08-27T22:01:34.000Z | tests/test_when_configuring_ravenpy_session.py | WenLogic/ravendb-py | 44239b02f3b9c1753fe70762e746c49bed552651 | [
"MIT"
] | 3 | 2016-05-10T22:50:38.000Z | 2016-08-27T21:32:00.000Z | tests/test_when_configuring_ravenpy_session.py | WenLogic/ravendb-py | 44239b02f3b9c1753fe70762e746c49bed552651 | [
"MIT"
] | 11 | 2015-02-16T23:16:02.000Z | 2022-01-05T13:03:43.000Z | import ravendb
import unittest
import test_base
| 41.038462 | 126 | 0.716026 | import ravendb
import unittest
import test_base
class test_when_configuring_ravenpy_session(test_base.TestCase):
def tearDown(self):
pass
def test_configuring_wait_for_non_stale_results(self):
self.session = ravendb.store(self.get_uri(), self.get_db(), waitForNonStaleResults = False... | 834 | 43 | 140 |
ff49e452f0ce373ed9dffd9e4c7f9a39e60bc5af | 843 | py | Python | CPU_Memory.py | UT1/Where-Am-I | 68058c8e1bb8b967abb6ed093821dd6c87daab60 | [
"MIT"
] | 4 | 2018-02-14T13:07:22.000Z | 2020-01-02T11:06:16.000Z | CPU_Memory.py | UT1/Where-Am-I | 68058c8e1bb8b967abb6ed093821dd6c87daab60 | [
"MIT"
] | null | null | null | CPU_Memory.py | UT1/Where-Am-I | 68058c8e1bb8b967abb6ed093821dd6c87daab60 | [
"MIT"
] | 1 | 2018-03-01T09:02:19.000Z | 2018-03-01T09:02:19.000Z | # -*- coding: utf-8 -*-
"""
Created on Wed Feb 14 14:13:49 2018
@author: srivastavau
"""
import psutil as psu
import pandas as pd
import time
print("What is happening to my CPU...?")
time.sleep(3)
ob=mcpu()
print("\n\t \tVirtual Memory Info\n")
ob.vm()
print("\n\t \tHard Disk Info\n")
ob.du()
| 28.1 | 154 | 0.569395 | # -*- coding: utf-8 -*-
"""
Created on Wed Feb 14 14:13:49 2018
@author: srivastavau
"""
import psutil as psu
import pandas as pd
import time
class mcpu:
def vm(this):
memo=psu.virtual_memory()
x=1000000000
print("Total Memory:"+str(memo[0]/x)+" GB\nAvailable Memory:"+s... | 449 | -10 | 91 |
74bdca1bdaff77a49fdf618740216b19aff54cc6 | 237 | py | Python | mysite/urls.py | lasher85/AirCheck | 52b2f78c7d797999df4952b1bcac9f7d2c12b42c | [
"MIT"
] | null | null | null | mysite/urls.py | lasher85/AirCheck | 52b2f78c7d797999df4952b1bcac9f7d2c12b42c | [
"MIT"
] | 8 | 2019-12-04T23:44:11.000Z | 2022-02-10T08:31:40.000Z | mysite/urls.py | lasher85/AirCheck | 52b2f78c7d797999df4952b1bcac9f7d2c12b42c | [
"MIT"
] | null | null | null | from django.contrib import admin
from django.urls import path, include
import debug_toolbar
urlpatterns = [
path('admin/', admin.site.urls),
path('', include('aircheck.urls')),
path('__debug__', include(debug_toolbar.urls)),
]
| 23.7 | 48 | 0.721519 | from django.contrib import admin
from django.urls import path, include
import debug_toolbar
urlpatterns = [
path('admin/', admin.site.urls),
path('', include('aircheck.urls')),
path('__debug__', include(debug_toolbar.urls)),
]
| 0 | 0 | 0 |
34e303f3266cf398d612a2d00c3d73f807eb2a66 | 1,539 | py | Python | metrics.py | galberding/occ_variational_autoencoder | 3f2ac25c7f77d84b93103eccd8541fafa470b065 | [
"MIT"
] | 3 | 2020-03-26T15:39:23.000Z | 2021-11-15T01:13:25.000Z | metrics.py | galberding/occ_variational_autoencoder | 3f2ac25c7f77d84b93103eccd8541fafa470b065 | [
"MIT"
] | null | null | null | metrics.py | galberding/occ_variational_autoencoder | 3f2ac25c7f77d84b93103eccd8541fafa470b065 | [
"MIT"
] | null | null | null | import numpy as np
import torch
def compute_iou(occ1, occ2):
''' Computes the Intersection over Union (IoU) value for two sets of
occupancy values.
Args:
occ1 (tensor): first set of occupancy values
occ2 (tensor): second set of occupancy values
'''
occ1 = np.asarray(occ1)
occ2... | 27.482143 | 72 | 0.611436 | import numpy as np
import torch
def compute_iou(occ1, occ2):
''' Computes the Intersection over Union (IoU) value for two sets of
occupancy values.
Args:
occ1 (tensor): first set of occupancy values
occ2 (tensor): second set of occupancy values
'''
occ1 = np.asarray(occ1)
occ2... | 0 | 0 | 0 |
8c1bb8ba939b4c7749c0f5e28e5d6af8024e9862 | 1,383 | py | Python | goscale/plugins/feeds/cms_plugins.py | sternoru/goscalecms | 7eee50357c47ebdfe3e573a8b4be3b67892d229e | [
"BSD-3-Clause"
] | 2 | 2015-09-28T10:07:38.000Z | 2016-05-31T00:17:16.000Z | goscale/plugins/feeds/cms_plugins.py | sternoru/goscalecms | 7eee50357c47ebdfe3e573a8b4be3b67892d229e | [
"BSD-3-Clause"
] | null | null | null | goscale/plugins/feeds/cms_plugins.py | sternoru/goscalecms | 7eee50357c47ebdfe3e573a8b4be3b67892d229e | [
"BSD-3-Clause"
] | null | null | null | from goscale.cms_plugins import GoscaleCMSPluginBase
from cms.plugin_pool import plugin_pool
from django.utils.translation import ugettext_lazy as _
from django.conf import settings
import models
GOSCALE_FEEDS_PLUGIN_TEMPLATES = getattr(settings, 'GOSCALE_FEEDS_PLUGIN_TEMPLATES', (
('posts.html', _('Posts')),
... | 26.596154 | 92 | 0.675343 | from goscale.cms_plugins import GoscaleCMSPluginBase
from cms.plugin_pool import plugin_pool
from django.utils.translation import ugettext_lazy as _
from django.conf import settings
import models
GOSCALE_FEEDS_PLUGIN_TEMPLATES = getattr(settings, 'GOSCALE_FEEDS_PLUGIN_TEMPLATES', (
('posts.html', _('Posts')),
... | 0 | 0 | 0 |
4c60ea4b14afa9fa0a891a99e88675f5a7eb5821 | 4,368 | py | Python | quickD3map/BaseMap.py | zachcp/quickD3map | 2ed7e4f41ef2d0b0f6ed9ee89bce65f4d7a66c13 | [
"BSD-3-Clause"
] | 5 | 2015-03-08T13:08:41.000Z | 2016-03-20T15:15:50.000Z | quickD3map/BaseMap.py | zachcp/quickD3map | 2ed7e4f41ef2d0b0f6ed9ee89bce65f4d7a66c13 | [
"BSD-3-Clause"
] | 1 | 2015-04-27T10:53:08.000Z | 2015-04-27T20:06:44.000Z | quickD3map/BaseMap.py | zachcp/quickD3map | 2ed7e4f41ef2d0b0f6ed9ee89bce65f4d7a66c13 | [
"BSD-3-Clause"
] | 1 | 2020-11-04T03:35:58.000Z | 2020-11-04T03:35:58.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import (absolute_import, division, print_function )
import codecs
import pandas as pd
from jinja2 import Environment, PackageLoader
from flask import Flask, render_template_string
from .utilities import latitude,longitude, map_templates
from .check_da... | 40.82243 | 108 | 0.60554 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import (absolute_import, division, print_function )
import codecs
import pandas as pd
from jinja2 import Environment, PackageLoader
from flask import Flask, render_template_string
from .utilities import latitude,longitude, map_templates
from .check_da... | 44 | 0 | 30 |
d679287ec6b5a72ba4d6b86d040824a8d8bca70c | 76 | py | Python | mongo/data_generator/models/__init__.py | svvladimir-ru/ugc_sprint_1 | 7ae4f9094f34981057f6c80d38bd96df6c96d2db | [
"MIT"
] | null | null | null | mongo/data_generator/models/__init__.py | svvladimir-ru/ugc_sprint_1 | 7ae4f9094f34981057f6c80d38bd96df6c96d2db | [
"MIT"
] | null | null | null | mongo/data_generator/models/__init__.py | svvladimir-ru/ugc_sprint_1 | 7ae4f9094f34981057f6c80d38bd96df6c96d2db | [
"MIT"
] | null | null | null | from .models import Likes, Reviews, Bookmarks, BaseCollection # noqa: F401
| 38 | 75 | 0.776316 | from .models import Likes, Reviews, Bookmarks, BaseCollection # noqa: F401
| 0 | 0 | 0 |
e681b4801f774ca0b4c66e9af2c455aba44dc33e | 247 | py | Python | manager/data_manager/__init__.py | peci1/botblox-manager-software | 4592b63a22f90c1daec2b950f80b996ebb3cfc38 | [
"MIT"
] | null | null | null | manager/data_manager/__init__.py | peci1/botblox-manager-software | 4592b63a22f90c1daec2b950f80b996ebb3cfc38 | [
"MIT"
] | null | null | null | manager/data_manager/__init__.py | peci1/botblox-manager-software | 4592b63a22f90c1daec2b950f80b996ebb3cfc38 | [
"MIT"
] | null | null | null | """Package for containing data manager functions to convert user input to commands."""
from manager.data_manager.mirror import PortMirrorConfig
from manager.data_manager.vlan import VlanConfig
__all__ = [
PortMirrorConfig,
VlanConfig,
]
| 24.7 | 86 | 0.789474 | """Package for containing data manager functions to convert user input to commands."""
from manager.data_manager.mirror import PortMirrorConfig
from manager.data_manager.vlan import VlanConfig
__all__ = [
PortMirrorConfig,
VlanConfig,
]
| 0 | 0 | 0 |
3b2433b810599805288a87224cb1bcc869430798 | 2,302 | py | Python | download_recordings/source/get_spectrum_names.py | PCH-Engineering/pch-cloud | 9b0f774c6f15e8ee02f8311b4965816d04d73edd | [
"MIT"
] | null | null | null | download_recordings/source/get_spectrum_names.py | PCH-Engineering/pch-cloud | 9b0f774c6f15e8ee02f8311b4965816d04d73edd | [
"MIT"
] | null | null | null | download_recordings/source/get_spectrum_names.py | PCH-Engineering/pch-cloud | 9b0f774c6f15e8ee02f8311b4965816d04d73edd | [
"MIT"
] | 1 | 2020-12-03T17:53:14.000Z | 2020-12-03T17:53:14.000Z | # import pchcloud api
import usermanager
import timerecording
import device
import pprint
import json
from datetime import datetime, timedelta
import dateutil.parser
import os
from pathlib import Path
parentdir = Path(__file__).parents[1]
pp = pprint.PrettyPrinter(indent=4)
if __name__ == "__main__":
# ge... | 32.422535 | 150 | 0.638575 | # import pchcloud api
import usermanager
import timerecording
import device
import pprint
import json
from datetime import datetime, timedelta
import dateutil.parser
import os
from pathlib import Path
parentdir = Path(__file__).parents[1]
pp = pprint.PrettyPrinter(indent=4)
if __name__ == "__main__":
# ge... | 0 | 0 | 0 |
d271bee57de53ffbc2a1d3f37c2435aaca3dcafb | 421 | py | Python | Nails segmentation/config.py | Vrushank264/Image-Segmentation-PyTorch | 1777ce554332e79a2c93067fa19fb512c0e463ec | [
"MIT"
] | null | null | null | Nails segmentation/config.py | Vrushank264/Image-Segmentation-PyTorch | 1777ce554332e79a2c93067fa19fb512c0e463ec | [
"MIT"
] | null | null | null | Nails segmentation/config.py | Vrushank264/Image-Segmentation-PyTorch | 1777ce554332e79a2c93067fa19fb512c0e463ec | [
"MIT"
] | null | null | null | import torch
IMAGE_DIR = 'E:/Computer Vision/Segmentation/Data/Train/Images'
MASK_DIR = 'E:/Computer Vision/Segmentation/Data/Train/labels'
VALID_IMAGE_DIR = 'E:/Computer Vision/Segmentation/Data/Validation/Images'
VALID_MASK_DIR = 'E:/Computer Vision/Segmentation/Data/Validation/labels'
MODEL_SAVE_DIR = 'E:/Com... | 38.272727 | 75 | 0.771971 | import torch
IMAGE_DIR = 'E:/Computer Vision/Segmentation/Data/Train/Images'
MASK_DIR = 'E:/Computer Vision/Segmentation/Data/Train/labels'
VALID_IMAGE_DIR = 'E:/Computer Vision/Segmentation/Data/Validation/Images'
VALID_MASK_DIR = 'E:/Computer Vision/Segmentation/Data/Validation/labels'
MODEL_SAVE_DIR = 'E:/Com... | 0 | 0 | 0 |
e9354da65bce905929c7e30e8d029033ec612dd2 | 2,430 | bzl | Python | tools/bazel_compat.bzl | marcin-kozinski/dagger | 3342e55365c41bc63aaec77cab3214bd9efb32af | [
"Apache-2.0"
] | 17,481 | 2015-01-01T03:47:42.000Z | 2022-03-31T22:30:34.000Z | tools/bazel_compat.bzl | marcin-kozinski/dagger | 3342e55365c41bc63aaec77cab3214bd9efb32af | [
"Apache-2.0"
] | 1,982 | 2015-01-01T18:16:55.000Z | 2022-03-31T18:35:19.000Z | tools/bazel_compat.bzl | marcin-kozinski/dagger | 3342e55365c41bc63aaec77cab3214bd9efb32af | [
"Apache-2.0"
] | 2,552 | 2015-01-03T15:58:02.000Z | 2022-03-30T11:10:08.000Z | # Copyright (C) 202 The Dagger Authors.
#
# 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 wr... | 36.818182 | 90 | 0.690535 | # Copyright (C) 202 The Dagger Authors.
#
# 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 wr... | 68 | 0 | 23 |
e5e25d26d2611f295464d0b5dc788af2d5a30c89 | 3,097 | py | Python | mnist_keras.py | awbuana/basic-ALPR | 54aba811bba5c8c288cc52242f82f09fce3b87a1 | [
"CNRI-Python"
] | null | null | null | mnist_keras.py | awbuana/basic-ALPR | 54aba811bba5c8c288cc52242f82f09fce3b87a1 | [
"CNRI-Python"
] | null | null | null | mnist_keras.py | awbuana/basic-ALPR | 54aba811bba5c8c288cc52242f82f09fce3b87a1 | [
"CNRI-Python"
] | null | null | null | import keras
from keras.datasets import mnist
from keras.models import Sequential
from keras.layers import Dense, Dropout, Flatten
from keras.layers import Conv2D, MaxPooling2D
from keras import backend as K
import cv2
import numpy as np
import time
start_time = time.time()
batch_size = 20
num_classes = 10... | 32.260417 | 71 | 0.672263 | import keras
from keras.datasets import mnist
from keras.models import Sequential
from keras.layers import Dense, Dropout, Flatten
from keras.layers import Conv2D, MaxPooling2D
from keras import backend as K
import cv2
import numpy as np
import time
start_time = time.time()
batch_size = 20
num_classes = 10... | 0 | 0 | 0 |