blob_id stringlengths 40 40 | directory_id stringlengths 40 40 | path stringlengths 2 283 | content_id stringlengths 40 40 | detected_licenses listlengths 0 91 | license_type stringclasses 2
values | repo_name stringlengths 3 135 | snapshot_id stringlengths 40 40 | revision_id stringlengths 40 40 | branch_name stringlengths 4 68 | visit_date timestamp[ns]date 2015-07-25 20:53:29 2023-09-06 10:46:05 | revision_date timestamp[ns]date 1970-01-01 00:00:00 2037-05-03 13:00:00 | committer_date timestamp[ns]date 1970-01-01 00:00:00 2036-02-09 17:40:36 | github_id int64 1.61k 691M ⌀ | star_events_count int64 0 209k | fork_events_count int64 0 110k | gha_license_id stringclasses 24
values | gha_event_created_at timestamp[ns]date 2012-06-03 10:21:33 2023-09-14 21:59:50 ⌀ | gha_created_at timestamp[ns]date 2008-03-27 23:40:48 2023-09-13 22:40:33 ⌀ | gha_language stringclasses 250
values | src_encoding stringclasses 27
values | language stringclasses 1
value | is_vendor bool 2
classes | is_generated bool 2
classes | length_bytes int64 6 10M | extension stringclasses 289
values | filename stringlengths 1 218 | content stringlengths 6 10M |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
d815c6e233d81dfb144442a83e6006aa4e29bfce | 534d24cd509640dc598b0e385752d81ea59307a7 | /vueSuit/__init__.py | 5c30ba6d29d3566da82d3cc1f3c5fdd93e3fcdaa | [
"BSD-3-Clause"
] | permissive | Ryuchen/django-vue-suit | 612cb7496cf9424182bf31655432df86d77df417 | 28c08a157cd243b475673ca7486aedb1719759ea | refs/heads/master | 2020-07-04T05:11:45.888119 | 2019-12-04T10:35:45 | 2019-12-04T10:35:45 | 202,167,517 | 24 | 3 | null | null | null | null | UTF-8 | Python | false | false | 241 | py | __init__.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# ==================================================
# @Author : Copyright@Ryuchen
# ==================================================
from .version import VERSION
__all__ = [
"VERSION"
]
|
eec52695e5afcc21e5fed6453e96cc3a58e7c1df | 37931e80bebf17f175ab2bcf720b2b66a9f02e1f | /micropython/tests/micropython/viper_misc.py | bef480fd60a1f0e081958f2cab3ee9501d9071df | [
"MIT"
] | permissive | jiapei100/Stereo | f9ef718533074155eb0ca26afe6d30da44187982 | 3c569d05545c8ad8fd3d86f9eabacc536ac0105e | refs/heads/master | 2020-12-31T00:18:46.272842 | 2016-10-12T03:10:23 | 2016-10-12T03:10:23 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,963 | py | viper_misc.py | import micropython
# viper function taking and returning ints
@micropython.viper
def viper_int(x:int, y:int) -> int:
return x + y + 3
print(viper_int(1, 2))
# viper function taking and returning objects
@micropython.viper
def viper_object(x:object, y:object) -> object:
return x + y
print(viper_obj... |
9119fc1c75de980bbcf74f1e06a36ba587fc490b | 85fefbd52ccf6ad440e9e4b09f960595efc6edfc | /BacktestStrategy.py | b15bda39fdb6dde7f7760d6a59ab26dfbe72e68f | [
"MIT"
] | permissive | phongle12300/BinanceTradingBot_RSI | 1f36853507580544151ff5e25d8d07f9e7fd136b | 94ae10ebead2552cdcfa34eb08123189c13a9580 | refs/heads/main | 2023-06-16T16:10:28.815549 | 2021-07-16T14:14:30 | 2021-07-16T14:14:30 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,318 | py | BacktestStrategy.py | import backtrader as bt
class RSIStrategy(bt.Strategy):
def __init__(self):
self.order = None
self.position.size = 0
self.sellAlert1 = False
self.sellAlert2 = False
self.buyAlert = False
self.failureNum = 0
self.successNum = 0
self.rsi_... |
99785ffb4b594db1fac05ca3d3f5764151b2b7b6 | 3f725cc46ecf127444d181d95d5314cf223d8d06 | /DsfPro1/api1/views.py | c803c9435bbb80c67d20b398ddaec6335d7f9d2d | [] | no_license | kunalnag/Django-REST-framework | 13539583540e21ed5786a2564b90cbcf813bb50e | d2acfffaaaec491e4f08ccaeb7fb404cc24bc903 | refs/heads/master | 2023-05-30T19:12:03.401855 | 2021-06-20T17:54:43 | 2021-06-20T17:54:43 | 378,707,241 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,981 | py | views.py | import django
from rest_framework import serializers
from django.shortcuts import render
from .models import Student
from .serializiers import StudentSerializer
from rest_framework.renderers import JSONRenderer
from django.http import HttpResponse,JsonResponse
import io
from rest_framework.parsers import JSONParser
f... |
cf0eb9685cdfc412871d3b36270ddab3e520bb8f | 70ec044e5ae7a51d26818835f93a3e5e832e6551 | /news_crawler/news_crawler/items.py | 52004a4ca42fab94cf0a0a074aced8161d47954f | [] | no_license | mzw4/MorningAssistant | 3a6f080dfc141f31461264884929562a97296e02 | 09aac511dbe4f5f569037be79adc0bc40f5da975 | refs/heads/master | 2021-01-10T06:57:56.037235 | 2016-02-10T05:20:16 | 2016-02-10T05:20:16 | 50,275,050 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 463 | py | items.py | # -*- coding: utf-8 -*-
# Define here the models for your scraped items
#
# See documentation in:
# http://doc.scrapy.org/en/latest/topics/items.html
import scrapy
class CnnArticleItem(scrapy.Item):
title = scrapy.Field()
developments = scrapy.Field()
body = scrapy.Field()
date = scrapy.Field()
clas... |
a42a94798d176e20646d41cf0f4b7e4f99e0790b | 6db539e09b29a396a78cab550d3ebf4123c8d3dc | /plenum/server/plugin/graphchain/stardog_graph_store.py | 624b6f54c00819fd59614e786ca8ed8714c81e26 | [] | no_license | MakoLab/graphchain-indy-plugin | 273e7c585c9c9d9732e85c8480d0beea14b76eff | da6d769e876a84db2d63600ff0c7f3fc6b690c52 | refs/heads/master | 2020-03-24T07:57:56.541635 | 2019-02-07T08:24:14 | 2019-02-07T08:24:14 | 142,580,998 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,521 | py | stardog_graph_store.py | import requests
from SPARQLWrapper import SPARQLWrapper, JSON
from rdflib import Graph
from plenum.server.plugin.graphchain.graph_store import GraphStore
from plenum.server.plugin.graphchain.logger import get_debug_logger
logger = get_debug_logger()
class StardogGraphStore(GraphStore):
def __init__(self, ts_db_... |
7affd79fb0bb47283bbd9a7fbcaa0ba43aa8e6a6 | 92bed726ddd588ab630857b8817b1d83cce3cdbc | /Basics/UsingFunc/countOfZeros.py | a9f07137a655752c97b0b8f8a226dd8f713a8974 | [] | no_license | kajaltingare/Python | 14efa25e272b397698d7bab4aa560e456693b6c6 | 268e83537674d003bafaacded5d7c8180bfe63c1 | refs/heads/master | 2020-04-16T11:20:24.359766 | 2019-03-03T17:12:02 | 2019-03-03T17:12:02 | 165,532,116 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 469 | py | countOfZeros.py | # Write a program to accept a no & count number of zeros in it.(int=32bits)
def countOfZeros(num):
cnt = 0
while(num!=0):
cnt+=1
num = num&(num-1)
return (32-cnt)
def main():
num = eval(input('Enter number to count zeros in it\'s binary: '))
print('Assumung int... |
62a7958ba5ebb6da866d6ef156e52136df22f235 | 70e80be09205be201099ce0826f32b5a27576dde | /Python/linkedincourse/types2.py | 0b3b8517bca3589d3b702f46afc5b933d155159e | [] | no_license | gitlearn212/My-Python-Lab | 9677e44ffe0e4b2d6db288dd37e6ed81a5bf8550 | c5bb63075d9b4ab7112bb001cb90f912ff184106 | refs/heads/master | 2020-04-14T09:07:42.046945 | 2020-01-31T09:06:13 | 2020-01-31T09:06:13 | 163,752,419 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 918 | py | types2.py |
# =============>This is a Normal mathematical tasks<==========
x = 7
x = 7 // 3 # rounds the number = 2 ans class int
#x = 7 / 3 # gives the floating number = 2.33333335 ans class float
#x = 7 % 3 # gives the reminder = 1 ans class int
#print("x is {}" .format(x))
#print(type(x))
# ================>This is how to ... |
0744ec646e7b9303c67c25dff2997568c6171b91 | 853c681733ecfd8fc322a1f1bfa2330b5c12acd0 | /skeleton/tools/makeautoexec.py | 44ce2331df00d17d8fb7fe782f11efb8ab0e74e5 | [
"Apache-2.0"
] | permissive | shred/nextskeleton | dc0f3dbeea3d92f9c7ef65e76568681b55bbcc16 | e45b76e4275ecdda5a50c39678c9db7f45fb6d88 | refs/heads/master | 2023-02-05T00:54:50.321560 | 2020-12-25T13:29:28 | 2020-12-25T13:29:28 | 262,142,250 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,083 | py | makeautoexec.py | #!/usr/bin/env python3
#
# nextskeleton - An assembler skeleton for the ZX Spectrum Next
#
# Copyright (C) 2020 Richard "Shred" Körber
# https://github.com/shred/nextskeleton
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You ma... |
8abfb6a9ca3a7a909a1e8125e8c03e29b2bacda8 | 09eafce3a8c9ee75d1fe2f19651d07ae279b44dc | /test.py | 2dd06b160ec0f74c17f0abd1f295ac7b0aa3fb82 | [] | no_license | michaelyhuang23/Stock-Prediction | 8ece755cc70277618fea6acc50a861358cb4bbf0 | 16175bb6701370ba1b051c1e9be9f7b4e9e1eb19 | refs/heads/master | 2023-07-08T08:15:42.784745 | 2021-08-08T21:07:14 | 2021-08-08T21:07:14 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 724 | py | test.py | from StockDatabase import StockDatabase
from RNNinner import RecurrentAnalyzer
import torch
import matplotlib.pyplot as plt
import numpy as np
database = StockDatabase()
database.read_data()
prices = torch.tensor(database.normalize(database.get_stock_prices('AAPL',length=2000)))
print(prices.shape)
model = RecurrentA... |
f69aba5dc2030aff3e257d64f9196db8bcf3b05e | eb1a2e24ecdbe9be8a6aac153fe1980b19dcbe4a | /124.py | f28f1ae8c44cccb1f1c04d0d2c8daf74458e1aef | [] | no_license | sushmithasushi/playerlevel | 1e7363e63bd75deba79b96a659db7736c93ed6a2 | 612ea4483a5c5d7c3c3a8564e0b7ce0df08a686a | refs/heads/master | 2020-06-19T07:03:06.457910 | 2019-07-24T04:28:31 | 2019-07-24T04:28:31 | 196,608,802 | 0 | 0 | null | 2019-07-12T16:08:51 | 2019-07-12T16:08:51 | null | UTF-8 | Python | false | false | 53 | py | 124.py | a,b,x=map(int,input().split())
c=a**b
c=c%x
print(c)
|
5ec1b114aed26dae35858843c90bc4acc3b5c802 | 793257505c9274eafe35c37d78a40e02e3d69b08 | /pyhac/detector/__init__.py | bfa4fddae2a34f092fffd17347f8c7ce78aa6530 | [
"Apache-2.0"
] | permissive | RACELAND-Automacao-Lda/hac | 304777a58549438a04432b1c6290a014398c1671 | 5905369344c985d5293d572a610c82308306e385 | refs/heads/main | 2023-07-20T21:31:45.197739 | 2021-09-06T07:09:04 | 2021-09-06T07:09:04 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 181 | py | __init__.py | #from .gesture_detector import GestureDetector, MouseControlGestureDetector
#from .action_detector import ActionDetector, RobloxLiftGameActionDetector
from .detector import Detector |
4850f6e0b16ec5c00fddb4540033054319c0f8b8 | 2f98aa7e5bfc2fc5ef25e4d5cfa1d7802e3a7fae | /python/python_3084.py | 5ce96dc929d923569b79072d033b0566e1540ebc | [] | no_license | AK-1121/code_extraction | cc812b6832b112e3ffcc2bb7eb4237fd85c88c01 | 5297a4a3aab3bb37efa24a89636935da04a1f8b6 | refs/heads/master | 2020-05-23T08:04:11.789141 | 2015-10-22T19:19:40 | 2015-10-22T19:19:40 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 69 | py | python_3084.py | # How can I get Eclipse / PyDev to ignore alternatives to cls?
klass
|
a24115ae5d35b199c704eadaa06671c6baf4fbcd | c7fe7351b5e51c4984d18ea196d863c93775e913 | /custom/forum/migrations/0006_auto_20180506_0653.py | 07f6641e02f8eb3ca7c6ed0f0612ae0c88038f6a | [] | no_license | dmitryro/lovehate | 4f3d2314cdc89aba0c97dccd509cd3f1f67070d2 | dadc959dc30cf4b5fe624bbaf0d9c133751ef7a4 | refs/heads/master | 2022-07-23T17:29:44.426166 | 2018-08-28T01:13:29 | 2018-08-28T01:13:29 | 131,538,865 | 0 | 0 | null | 2022-07-06T20:10:08 | 2018-04-29T23:42:25 | HTML | UTF-8 | Python | false | false | 766 | py | 0006_auto_20180506_0653.py | # Generated by Django 2.0.4 on 2018-05-06 11:53
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('forum', '0005_auto_20180502_2154'),
]
operations = [
migrations.AddField(
model_name='emotion',
name='ip_address',
... |
46ed3a41a23786f5b50d175c5b76da6fd0a43a41 | abbc2d332bdfa036ac12438983e6d74cf4107e64 | /SiamMask/SiamMask-pysot/got10k/experiments/vot.py | 2c4dc0915930362e0735b0dcf448be6bedc0776c | [] | permissive | HonglinChu/SiamTrackers | c494cff7543a433e8ec7dbf6d9439b1e7395b0c0 | 805208b5348346d35e64abcbe901a3829743e157 | refs/heads/master | 2023-08-29T06:50:59.532271 | 2023-03-06T09:13:53 | 2023-03-06T09:13:53 | 253,718,080 | 1,166 | 243 | Apache-2.0 | 2023-08-03T16:39:53 | 2020-04-07T07:24:00 | Python | UTF-8 | Python | false | false | 23,285 | py | vot.py | from __future__ import absolute_import, division, print_function
import cv2
import time
import numpy as np
import os
import glob
import warnings
import json
from PIL import Image
from ..datasets import VOT
from ..utils.metrics import poly_iou
from ..utils.viz import show_frame
from tqdm import tqdm
class Experiment... |
6a29b68a633554e0e080b1ab01d5cc646d1e906e | 97cd4d3e34e97dd4db564bfd22b1ed54dbb66d2d | /Crawler/newCrawler.py | 611450e0145fc6165dbaf339aabed3773808dd84 | [] | no_license | zhangyijun0518/ActivityCentral | 4a5e43fa197a23e10dc06374e13c519f1b7e0b53 | bc893e7214c5c4262e335b91f55fbcf0aed96a42 | refs/heads/main | 2023-06-22T16:47:31.995610 | 2021-07-14T14:24:46 | 2021-07-14T14:24:46 | 385,962,547 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,226 | py | newCrawler.py | import requests
from bs4 import BeautifulSoup
import urllib.parse
import os.path
import sys
from optparse import OptionParser
from datetime import datetime
import re
#we only crawl urls starts with https://www.eventbrite.com/e/
outputDir = "output"
urlDir = 'urls'
startTime = ''
startURL = 'https://www.eventbrite.c... |
5a7b48c2267ed3b41ad2253f491b4b9782619dba | 964828c3b23201a7d5379327cdd16bd3edf2f392 | /Node.py | 199e49d3a7d7827fa2fe31352db6f23603ce705c | [] | no_license | lausdahl/snapster | f53005beeb3127c21726eda22efbab3e32dea730 | 2c7a42beb1fd8294ea9ea7c610239642e0f8a1b5 | refs/heads/master | 2021-01-02T09:38:40.010728 | 2007-09-26T16:41:54 | 2007-09-26T16:41:54 | 32,200,422 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,223 | py | Node.py | #!/usr/bin/env python
#Class with information about a node
import GUID
import time
import traceback
class Node:
#def __init__(self):
# self.id=GUID.GUID().uuid()
id = ""
quality = 0
port = 0
ip = ""
numberOfNeighbours = 0
fileSharePort = 0
modified = time.time()
def Sho... |
e7bb01aeac42969521def0c0eaff8a77a0e441da | 1b16238a6dbc654af2d5315bb9f5aa2a27e97f8d | /test.py | 912b9dd7b48d325c85d03de4e3a1d254f0e25027 | [] | no_license | financo/PyCharm_workspace | bd85952889b743a4b0a510e2608d66c9354e925d | c0d40d701a2b521deeb3737e4aa6b766cdcd67e4 | refs/heads/master | 2020-03-07T22:42:56.641037 | 2018-04-02T13:44:42 | 2018-04-02T13:44:42 | 127,761,835 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 573 | py | test.py | #!/usr/bin/python
# -*- coding: UTF-8 -*-
import math
print 'hello world!'
print '你好,世界!'
class Person(object):
def __init__(self, name, score):
self.name = name
self.__score = score
p = Person('Bob', 59)
print p.name
print p.__score
# for x in range(1, 10):
# for y in range(0, 10):
# ... |
711cd9709ba940703a65f813df4f171eaf792d65 | f1bc39b4c669573dc52b5b4bcdd8f97880960dd4 | /capa_explorer_plugin/__init__.py | 80a036a6dfdd04bdbe553105115c81415ae59108 | [
"Apache-2.0"
] | permissive | youngjun-chang/capa-explorer | 437e1d366f9579078425cf45a6119bb3b40f8764 | e540040b9a9535a12f08ac282625cd8493e260e9 | refs/heads/master | 2022-12-28T19:48:35.630136 | 2020-10-10T14:06:24 | 2020-10-10T14:06:24 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 83 | py | __init__.py | try:
from .cutterplugin import create_cutter_plugin
except Exception:
pass
|
d6c76c646cb620202b56e304f6dd7db28ab1bcd5 | 5354e1fe576445b7e76463a301051341b1607027 | /ward/_ward_version.py | 8bb987571e0528898ba1815fb52845d644c00343 | [
"MIT"
] | permissive | DorianCzichotzki/ward | f72f541ed228d357cd47a5945d2c427a8e3ece87 | c4aeafbc4397a0ed9998e90ee305ede5d8786e88 | refs/heads/master | 2021-01-09T19:00:22.451264 | 2020-02-21T18:56:11 | 2020-02-21T18:56:11 | 242,420,538 | 0 | 0 | MIT | 2020-02-22T22:27:36 | 2020-02-22T22:27:35 | null | UTF-8 | Python | false | false | 25 | py | _ward_version.py | __version__ = "0.35.0b0"
|
9e851b732960cd33a62be52f87d7cac9bf36b183 | 69beec9861337798b0dfd3d381b9f395852f8716 | /Computer Vision/image_reshape.py | 1cd469c0bb9bfae412f58171fc7849fdc2f30c2d | [] | no_license | impawan/PythonRep | 678f10d201d1e4e20b68069a77f1aa95b060049e | c98b0ea200ec5d32e8be4d9d2d659ae5a5b9892f | refs/heads/master | 2023-05-12T20:28:17.291945 | 2021-06-03T19:17:57 | 2021-06-03T19:17:57 | 65,131,656 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 445 | py | image_reshape.py | # -*- coding: utf-8 -*-
"""
Created on Sat Apr 6 12:36:23 2019
@author: Pawan
"""
import cv2
import numpy as np
image = cv2.imread('img.jpg')
print(image.shape[1])
r = 200.0 / image.shape[1]
dim = (200, int(image.shape[0] * r))
# res = cv2.resize(img,None,fx=2, fy=2, interpolation = cv2.INTER_CUBIC)
resized =... |
75be05841660b71f7bae61310e712951c647a913 | 4d1059fdac9006016488cb5b3b86048e4f428aec | /eval.py | 2eaed3bbebe382b9aecd6f69e5c7085791b1a565 | [] | no_license | jiawozhong/TrafficManipulator | ca1a2059566f37dda4069807c2e661a42550b499 | 99807048c61dea548c55bc2720ea31369bc90fd1 | refs/heads/master | 2023-06-10T11:37:07.162625 | 2021-07-03T18:36:41 | 2021-07-03T18:36:41 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 9,225 | py | eval.py | from scapy.all import *
import numpy as np
import matplotlib.pyplot as plt
import pickle as pkl
import sys
import argparse
from utils import *
sys.path.append('./KitNET')
from KitNET.model import test_mut
def Euclidean_Distance(v1, v2):
dis = np.linalg.norm(v1 - v2)
return dis
class Analyzer:
def __ini... |
c6a235099192f4831ea0a4ee9a784bbbf008f956 | 8cc3d2885011f9925ad40aa5e39ea2cb50170ac1 | /db/database.py | 732e6e2ef636dae7f9f17927c54c015827a3279e | [
"MIT"
] | permissive | inf6150-doublej/backend | e65f241bbf655cb2e307e4d7e1352f73b03185ff | 7734bce3b531213f62eb04c2f89cecde490702b8 | refs/heads/master | 2021-06-15T17:52:42.263477 | 2019-06-08T19:23:41 | 2019-06-08T19:23:41 | 185,879,081 | 0 | 0 | MIT | 2021-05-06T19:33:21 | 2019-05-09T22:17:17 | Python | UTF-8 | Python | false | false | 782 | py | database.py | # coding: utf8
import sqlite3
from binascii import a2b_base64
import os
class Database:
__instance = None
@staticmethod
def get_connection():
if Database.__instance == None:
Database()
return Database.__instance.connection
def __init__(self):
if Database.__instan... |
6854c2b605f5362786d6fa3cde730323709c9954 | e3a52b47211358aea293275fd7fcbbebad09c7a6 | /libs/testing_tools.py | 1f7228d96fb7a3e73e95f310eeee77bd2d6bee36 | [] | no_license | Eduarcher/peer_to_peer_video_share | ce961d402c02a8376fc66bfb611c0dd06ce90be6 | 86a0e728aeb48b38e24c6b062f275cc6d05744d7 | refs/heads/main | 2023-03-27T06:03:58.934950 | 2021-03-19T13:21:16 | 2021-03-19T13:21:16 | 345,792,724 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,782 | py | testing_tools.py | import os
import shutil
import sys
import filecmp
def delete_files(folder):
"""
Deletes all files in the folder
:param folder: Folder to delete files
:return: 0 if success and -1 if failed
"""
print("Deleting files on", folder)
for filename in os.listdir(folder):
print("Deleting:",... |
6fba1ac99ffc6dc489a663f679df622ea1948d41 | aa88548d729211428b3d5d7cfb9c3ba5881e168a | /resilient-sdk/tests/unit/test_util/test_jinja_filters.py | d92ad37d6398a1c4209b5d5fa67557c21de01021 | [
"MIT"
] | permissive | svetterIO/resilient-python-api | 784cb83aaff353e8aa6ce0000b241a693977b5b9 | d89440ccee621cb4268ee8ebb350e47e7c9ee26b | refs/heads/master | 2023-08-31T22:15:27.588822 | 2021-10-13T13:15:12 | 2021-10-13T13:15:12 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 916 | py | test_jinja_filters.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# (c) Copyright IBM Corp. 2010, 2020. All Rights Reserved.
from jinja2 import Environment
from resilient_sdk.util.jinja2_filters import add_filters_to_jinja_env, JINJA_FILTERS, _filter_base64, _filter_camel
def mock_setup_jinja_env():
return Environment()
def test_... |
246dc43a1997bd79c899de2839be2425d5275020 | de8f89900e8ddcbe5866d0d35f0114559a24923b | /Shortened URL/main.py | a2019eab7bc4f72f8e8c70613d25571ae8e67507 | [] | no_license | Chgabri2/Python-Projects | ef9e6303b7d9823e08ba5db29dfb101f31036f29 | b970b988584d4843cdde073e3c960de5b451e67d | refs/heads/master | 2022-10-21T09:54:46.111102 | 2020-06-02T17:44:34 | 2020-06-02T17:44:34 | 268,830,873 | 0 | 0 | null | 2020-06-02T14:57:44 | 2020-06-02T14:57:44 | null | UTF-8 | Python | false | false | 1,515 | py | main.py | import json
import random
import string
all_data_dict = {}
NEW_URL_LENGTH = 8
def import_data_to_dict():
with open('all_data.txt') as json_file:
data_dict = json.load(json_file)
return data_dict
def return_data_to_file(data_dict):
with open('all_data.txt', 'w') as my_file:
json.dump(dat... |
3aa4a6019b66906c9e1b6534669396b3c58b0abf | f356397c34bc68bab928ec7996270375cbe70156 | /space_torus/soundbank.py | a6c082bcd5f1aea47c64e2a30cedac1027148744 | [] | no_license | Xyene/SpaceTorus | 423dc7647ff0429ceab4c7e6f43d6345f7195d55 | 14f327b4929da6ce0eb8a11697b139d2f67dd473 | refs/heads/master | 2020-05-15T20:52:37.506821 | 2014-03-08T18:53:01 | 2014-03-08T18:53:01 | 13,683,301 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 126 | py | soundbank.py | import pyglet
import os
THEME = pyglet.media.load(os.path.join(os.path.dirname(__file__), 'assets', 'music', 'theme.mp3')) |
da0d85c6ee2d08458044dbf625662caf11a73cd4 | cc1164440e1a18168087cf834655042232997a8f | /src/chameleon/smelter/v1/crawl/data_pb2.py | a1c9eacb7c70b1dc0ba8bfb3bda1ef0f2e2a9b1f | [] | no_license | Rinal-Dev02/VoilaCrawler3 | 9f1c803ce95e43ce52560c73a09c217a5b7b531d | dd8239ef668ebeb21f75753860faf6f08f71c95f | refs/heads/main | 2023-08-23T19:22:00.634633 | 2021-10-11T06:19:30 | 2021-10-11T06:19:30 | 415,796,718 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | true | 59,310 | py | data_pb2.py | # encoding=utf8
# -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: chameleon/smelter/v1/crawl/data.proto
"""Generated protocol buffer code."""
from google.protobuf.internal import enum_type_wrapper
from google.protobuf import descriptor as _descriptor
from google.protobuf impor... |
1b44941ddafd14f6994c1766a46571908cb26d2e | a25f6356ae3110cbfa4e0ac79b41a42cd957f56a | /test_add_data_utils.py | feeb600f122754850a12fafc1d3541a6f9df5faa | [
"MIT"
] | permissive | ziyuan-shen/hr_sentinel_server | e99efc2b54eabc6d517814d6049095637aa30d33 | 7ba46b5241b34ae7be44918b0e2359a245e4f0e1 | refs/heads/master | 2022-11-28T17:08:35.470953 | 2020-08-07T02:32:37 | 2020-08-07T02:32:37 | 285,718,073 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 878 | py | test_add_data_utils.py | import pytest
@pytest.mark.parametrize("db, id, email, age, expected", [
({}, 100, "john.smith@duke.edu", 40, True)
])
def test_add_patient_to_db(db, id, email, age, expected):
from add_data_utils import add_patient_to_db
answer = add_patient_to_db(db, id, email, age)
assert answer == expected
@pyte... |
c98c0ab37ec763e9b2a083044bb104e4e19169ea | 229b5bb81cdaad731b9ab823d4bccc9c2f26c159 | /todo/tables.py | c145a0094f45153d59dbd033a2ee8b713ee39558 | [] | no_license | kirbyeggs/todosite | 1d3619e78d4b16d636cee76aef303d93cf53752c | c506c4f9ed328e3ed7c6e490e5cfe8c1f734d880 | refs/heads/master | 2021-01-10T08:26:23.577811 | 2015-12-02T00:01:44 | 2015-12-02T00:01:44 | 45,493,483 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 414 | py | tables.py | import django_tables2 as tables
from .models import To_do
class CheckBoxColumnWithName(tables.CheckBoxColumn):
@property
def header(self):
return self.verbose_name
class To_doTable(tables.Table):
remove = CheckBoxColumnWithName(accessor='pk', verbose_name="Remove")
class Meta:
model = T... |
dfd0b5b5c24038fbcd898ed5f5a204944721bbc3 | 63c382060116969c3a9f0a4e3e784591f1cbccce | /1-25/P3.py | 6ff1b1e1e7d028eb29e81ed535f1eda755de2e30 | [] | no_license | burnsjordan/Project-Euler | ba94bd269e0ec2874c69d62de581fb340f0057ea | 46bf172ebadc94812ca226b634916fa270c85bfa | refs/heads/master | 2021-05-08T11:57:40.059912 | 2021-03-12T03:16:15 | 2021-03-12T03:16:15 | 119,917,422 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 365 | py | P3.py | number = 600851475143
factors = []
def findFactors(n):
i = 2
check = True
while i < n:
if n % i == 0:
factors.append(i)
num = n / i
findFactors(num)
check = False
break
else:
i += 1
if check:
factors.append(... |
67b90ae9555edeee70b946e7bea186f79b3b17c3 | 0116c3178f1ea54468fb8ed0dca08338e1f37900 | /deeppacket/evaluate.py | 112aca8dd460a36d013a8fede7075321edf8b8d7 | [
"MIT"
] | permissive | trireg/EBSNN | d9a8d2fabeb486e56607404feaac79070084d7ff | b9c374f3e584b45e33abf723c127d9411f697ae0 | refs/heads/main | 2023-06-26T10:25:53.471388 | 2021-07-28T09:08:03 | 2021-07-28T09:08:03 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,546 | py | evaluate.py | from sklearn.metrics import classification_report
import torch.nn as nn
import numpy as np
from sklearn.metrics import accuracy_score
from sklearn.metrics import confusion_matrix
from overall import CUDA, DEVICE, NUM_CLASS
from time import time
def evaluate_loss_acc(model, dataloader, is_cm):
loss_func = nn.Cross... |
81e90c4fbfe6c026cd115351b4417a718d812a43 | 521e115996bbed23daf473b1bd068a65ed266576 | /Python/OnlineProblemSolving/EulerProject/Euler025.py | c5d83444f025875b9b941e5268857929623fe77a | [] | no_license | OzgeDemirel91/academic_projects | c23f57e27ecfaa4ebabd9b84aec5f129177d2a3e | 8cdc62b1172e6ac07e08268485c516a4b0eece43 | refs/heads/master | 2023-03-20T20:59:26.024719 | 2019-08-03T07:45:06 | 2019-08-03T07:45:06 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 242 | py | Euler025.py |
fib=0L
fib_1=1L
fib_2=1L
cpt=2;
while( len(str(fib))<1000 ):
cpt+=1
fib=fib_1+fib_2;
fib_2=fib_1
fib_1=fib
assert (cpt == 12 and fib == 144) or cpt!=12, "fib 144 is not 12th!"
print cpt,"==>",len(str(fib))
|
67084c477de50088d12ef42474e74e4d863d9244 | a3a1689eeee90a94e6d48469e2723e8a57de20ce | /tieba.py | 46a97fa8a7c09027ee6e0ada2b2b3e78a03db898 | [] | no_license | fendouai/tieba_post | e809786d3f99a94b1d8cda57d49c8c152bc7a611 | a7e69165a2aa15f0b7d5ab2b971a91b3a1c4f9d8 | refs/heads/master | 2021-01-14T10:31:19.472910 | 2016-02-17T04:25:33 | 2016-02-17T04:25:33 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,790 | py | tieba.py | # coding: utf-8
from bs4 import BeautifulSoup
import requests
import urllib
import urllib2
import json
import re
import datetime
class Post(object):
"""与需要登陆相关的类,如发帖,签到,
"""
def __init__(self, username, password):
self.base_url = 'http://www.baidu.com'
self.session = requests.Session()
... |
708ba19890515ec3464984b7dec3dbe4ec8c4173 | 176733b9dfef289b3e01a30a10161ca1cf615623 | /Midterm/doublylinklist.py | 67681ae4bbaf0c17324595a33bf797df5eb815f0 | [] | no_license | It5Me/Datastructure | cc53a0b46a301a4c8886254365bad6f01b130cb2 | da24a9cc05c732d4e4e2e93528570174fec7d086 | refs/heads/master | 2023-01-29T19:04:53.648764 | 2020-12-10T13:08:48 | 2020-12-10T13:08:48 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,175 | py | doublylinklist.py | class Node:
def __init__(self,data):
self.data=data
self.next=None
self.previous=None
class Doublylinklist:
def __init__(self):
self.head=None
self.tail=None
self.sizes=0
def isEmpty(self):
return self.head==None
def append(self,data):
if n... |
86acc590dd74f5744639b9844fd165b17adaf7c7 | f7983f4b74cb9fcd6154007f3b11b34b9ad11ede | /urbansim/zone/developable_maximum_commercial_sqft.py | 76b22fc31eb6dd0d5cd62203207ed0425c93b5b6 | [] | no_license | psrc/urbansim | 7d2fe615d7c22db839c283304067fce746fdb512 | c392d15b35aa1d47bbc185ed76314f8e6dd9f92f | refs/heads/master | 2023-06-09T16:55:50.415783 | 2023-05-11T19:24:34 | 2023-05-11T19:24:34 | 19,719,383 | 4 | 1 | null | null | null | null | UTF-8 | Python | false | false | 519 | py | developable_maximum_commercial_sqft.py | # Opus/UrbanSim urban simulation software.
# Copyright (C) 2010-2011 University of California, Berkeley, 2005-2009 University of Washington
# See opus_core/LICENSE
from developable_maximum_industrial_sqft import developable_maximum_industrial_sqft
class developable_maximum_commercial_sqft(developable_maximum_... |
de0928ae1570a09a9a5668ce22de2b1bba2cf044 | e2cfbfea800d3bda6c99b73b9f158465e1311b1c | /pytest/conftest.py | 8418b333793cc0781ab93497c80b964958e238ab | [] | no_license | slawomirkot/easybooking | b71a7888cb1bdc945ed1b8ba9a461f77cc465fb9 | c06c56acf8215c5fa4c75fb92c095eb4b3dc9534 | refs/heads/main | 2023-05-31T05:28:07.614360 | 2021-07-09T13:15:27 | 2021-07-09T13:15:27 | 378,625,220 | 0 | 0 | null | 2021-07-09T09:35:07 | 2021-06-20T11:11:16 | Python | UTF-8 | Python | false | false | 787 | py | conftest.py | import pytest
from django.contrib.auth.forms import UserCreationForm
from django.contrib.auth.models import User
from bookingvisit.models import *
@pytest.fixture
def user():
u = User(username="Sławek")
u.set_password('1234koT3')
u.save()
return u
@pytest.fixture
def client_profil(user):
p = Clie... |
6bdb4d47058059b9180b8d762fd33a38b4be3a74 | 471a983cdd539c4b79b04fe81706fefb659eb27a | /preprocessing.py | 200f2ced12bb541e112a0734883f08bc7c80842a | [] | no_license | Katy-katy/Image-Classification-Using-Tensorflow | 824c8cdd4212224d7719cc4954f79333448cdefb | e68d959a0adbf76d99ed210c9ca210b3997f2ec1 | refs/heads/master | 2021-01-19T16:01:39.011187 | 2017-10-05T22:38:14 | 2017-10-05T22:38:14 | 88,238,562 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,923 | py | preprocessing.py | import piexif
from os import listdir
from os.path import isfile, isdir, join, splitext
import cv2
import matplotlib
import numpy as np
import pickle
from random import shuffle
def process_files (filename, training_data, labels, names):
name = 'train/' + d + "/" +filename
names.append(name)
im = cv2.imread(... |
59eb2a72eebca5814160266a9f4b1a464c59b19e | 3c42a9bbc6287f361626a416e665564ff67d94b4 | /blueprints/Simon_blueprints.py | d453ebc4f3eb4f49327a400e54e3bc91cfe4972f | [] | no_license | Joao368/microservicoSimon | 258264b2fdb940e44a60a949566ce973cbeae80d | 590c16c5fb18a85846c26f847669303d859d8025 | refs/heads/main | 2023-07-19T00:25:01.623900 | 2021-09-09T17:56:48 | 2021-09-09T17:56:48 | 404,807,406 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,279 | py | Simon_blueprints.py | from flask import *
from flask_cors import cross_origin
from dpmlainf.service import service
from dpmlainf.database import Es_bank
simon_server_blueprint = Blueprint('simon-server-blueprint', __name__)
@simon_server_blueprint.route('/search_graph_data', methods=['GET'])
@cross_origin(send_wildcard=True)
def search_gr... |
3f387edb380083cedb2962c17a90c6db3e9d7c09 | b2e2277208f22fdd1654e7a2a19d49a0bdcb0ef6 | /twitterstream7.py | 9a2abe535034af712d162b3edf3061bd1dd595bf | [] | no_license | 13537875570/General-Urban-Evaluation | 504d3fa3c32f69940c454f13ac401be12d3d03ea | 513922d01d5b23ba9244f3704dab5d0793ecf165 | refs/heads/master | 2020-10-02T10:25:24.572538 | 2019-12-13T05:19:05 | 2019-12-13T05:19:05 | 227,756,183 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,392 | py | twitterstream7.py |
from tweepy import Stream
from tweepy import OAuthHandler
from tweepy.streaming import StreamListener
import time
consumerkey='qgEq1bQqaPBtE9MUe9iXjel5J'
consumersecret='gZOzN5oQswfcfqkdTzLd49DgibiCKdVNY2hYuzQakwX4GYCnIR'
accesstoken='2780294182-MvbzCoYYsdiCgr5I2tzT9FSbqObkQhaYfbNlSA9'
accesssecret='kR7TQ3yN... |
48858aee290096b1e7328d19e49372e8a9f83c83 | 5d7566a3c62249115c19c1e8340cb94bf33b1a6f | /nanshe_workflow/vis.py | 81d7dd3308970fe67d1340e18b0277366efaddb1 | [
"Apache-2.0"
] | permissive | lenayan7/nanshe_workflow | 6ffaf6bb0a8aacb5824e04a83757bb1ab61c4e92 | 15ba68bd281e8412e3412fbe6c1f08975b0d025b | refs/heads/master | 2021-01-02T09:10:36.418390 | 2017-07-20T00:20:40 | 2017-07-20T00:20:40 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,330 | py | vis.py | __author__ = "John Kirkham <kirkhamj@janelia.hhmi.org>"
__date__ = "$Nov 10, 2015 19:44$"
import webcolors
import numpy
import scipy
import scipy.ndimage
from matplotlib.colors import ColorConverter
from matplotlib.cm import gist_rainbow
from builtins import (
map as imap,
range as irange,
)
from imgroi.... |
677a698c4a4a5ca85130aa7add8fe4537a3391fa | 3228c7ab30e7d1b8a51454b470b4b94a6c810cbf | /utils/image_utils.py | d254f5b828e42bc927666e584aa1465647adbdf6 | [
"MIT"
] | permissive | GAIMJKP/CSDGAN | ca0cdf66f0219dd50aaa4a4ffbab305ad30fe4f9 | 712be213e59b32a79a4970684d726af63616edaf | refs/heads/master | 2022-03-30T04:44:18.298640 | 2020-01-25T00:13:01 | 2020-01-25T00:13:01 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,484 | py | image_utils.py | import utils.utils as uu
import torch
import matplotlib.pyplot as plt
import numpy as np
import torchvision.utils as vutils
import torch.nn as nn
from sklearn.model_selection import train_test_split
import torchvision.transforms as t
def img_dataset_preprocessor(x, y, splits, seed=None):
"""Min-max scales an ima... |
574062c6d8c00a548fab2f675267761768842ed0 | 170c99fdb0c72543d31c56461a9810a1d3668753 | /lib/geojson/base.py | 1bd69dd543710e2ad6fdff8323a35ddc37be543e | [] | no_license | earth-genome/water-service | dcc8f345c771a2ef3354ffb41fbe3964566eec26 | 009a83a9f55e8ca2a8be369fb45a06f17024b303 | refs/heads/master | 2021-01-10T12:30:31.092194 | 2015-12-22T23:47:54 | 2015-12-22T23:47:54 | 47,979,544 | 5 | 4 | null | null | null | null | UTF-8 | Python | false | false | 2,815 | py | base.py | import geojson
from geojson.mapping import to_mapping
class GeoJSON(dict):
def __init__(self, iterable=(), **extra):
super(GeoJSON, self).__init__(iterable)
self["type"] = getattr(self, "type", type(self).__name__)
self.update(extra)
def __repr__(self):
return geojson.dumps(s... |
1f7a23058478a894696a5816546d3ceb6ed76bbf | 68002ae9f124d808395b51944b616da298068b62 | /Data_Visualization/Plot/demo.py | e4598bdef60ee77045a6d9d92da208bb2c702369 | [] | no_license | supergravity/PythonLearning- | b4dd51205470f27e1ba92ec19b1fa1c967101545 | eb53b048650a7272819b45943d3dd40fa91d2297 | refs/heads/master | 2023-01-04T23:15:59.945385 | 2020-11-06T13:35:15 | 2020-11-06T13:35:15 | 82,797,936 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 483 | py | demo.py | import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
## Generating time scale
x = pd.period_range(pd.datetime.now(), periods=200, freq='d')
x = x.to_timestamp().to_pydatetime()
## Generating 3 sets of data, each with 200 Normal Distribution
y = np.random.randn(200, 3).cumsum(0)
plt.plot(x, y)
plo... |
bb5c2286c5e3a0f8fa01a9eca0a21c8dd3132451 | 73a5317f0c9d146d5723d6f2f7b04e9ddc581db7 | /invest_app/migrations/0003_auto_20190129_1855.py | 982a46a6e3d10d3dfd0aa84eeb6e32e4906582fe | [] | no_license | songlinyang/mybid | 9e5938eac8899352422d6d1c5b2d6338568fafe7 | 33fb44539182d773012ab39caa202816b1dbae22 | refs/heads/master | 2020-04-19T21:27:38.072773 | 2019-03-07T05:36:08 | 2019-03-07T05:36:08 | 168,441,542 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,223 | py | 0003_auto_20190129_1855.py | # Generated by Django 2.1.3 on 2019-01-29 10:55
from django.db import migrations, models
import django.db.models.expressions
class Migration(migrations.Migration):
dependencies = [
('invest_app', '0002_auto_20190129_1436'),
]
operations = [
migrations.CreateModel(
name='Matc... |
e1602167b2312e02c9d2aaa775430550fa24ab06 | a5699a4156e14a9437731528864bbbaecfe2cb6b | /hello.py | 11ca9ffc07e297cb8e5f74cff8a74734f9b5fbdb | [] | no_license | rohitdoddapani/amazonReviewScraper | 0f76df820a2aa1604ce4bd92fd5162e8718130ae | 80f05145042660af0f42a75b5d9c313820127c1d | refs/heads/main | 2023-03-03T20:22:57.372382 | 2021-02-17T13:27:08 | 2021-02-17T13:27:08 | 339,715,729 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,056 | py | hello.py | from flask import Flask, redirect, url_for, render_template, request
from bs4 import BeautifulSoup as bs
import requests
import pandas as pd
import math
import time
headers = {'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.95 Safari/537.36'}
# In... |
4099332925875cbb61e3536af7b7bd9b93d1d62b | 9dba9fc1c6258877937a3473e36621f934c4e814 | /PluralSightCourse/arithmetictset.py | 1c285a822b756468a30d33c45dd9688f33432add | [] | no_license | justicarxxvi8/PycharmProjects | bb9c31ded99c10e58e229591ae6992fa1c717a97 | f8d6a55e8d84307e37bc34ca33131f9ab87879a2 | refs/heads/master | 2021-08-20T07:17:29.207085 | 2017-11-28T14:08:07 | 2017-11-28T14:08:07 | 112,343,418 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 222 | py | arithmetictset.py | x = input("put in your first number")
y = input("put in your second number")
def addition():
z = int(x)+int(y)
print(z)
return z
def subtraction(f):
g = f - 5
print(g)
x = addition()
subtraction(x) |
e1922d0822277127c4cdca7fc514b7edbe27f846 | a3004215c4f98f4aa255faabcf533961d217e4f6 | /main.py | 13f51a632537f13782beda96c7366d687c7578bd | [] | no_license | squidinkettle/checkers | 2b4c9b08fa380d19a0116cc812f894f7f9c74bc5 | 05aac80a3fe795b19652ee4821a0c637da675d35 | refs/heads/master | 2021-01-25T10:06:25.293584 | 2018-02-28T20:51:38 | 2018-02-28T20:51:38 | 123,339,820 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 19,211 | py | main.py | import pygame, sys
from pygame.locals import *
from pygame import *
import random
import time
pygame.init()
#L4149
# ======= Game Window
board = pygame.image.load('checkerboard.jpg')
size = board.get_rect().size
width = size[0] + 50
height = size[1]
GAME_WINDOW = pygame.display.set_mode((width, height))
pygame.displ... |
cf2a3e122a59ac1e2f5030326aecd7945963ddb6 | bf32aa7664731320fd3ca9422623237a07112e72 | /spoj/codeforces/619-2/2.py | 431216278e06bfbeaaece8cca60495351ece3d79 | [] | no_license | rohit-100/cppFiles | 69c2b2030f8c573d80c28001cc8e220e4001b601 | 1912b7d90600a92b18ea59f9fd44edd20969a67f | refs/heads/master | 2020-12-12T12:07:55.345431 | 2020-07-24T14:26:10 | 2020-07-24T14:26:10 | 234,124,535 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,079 | py | 2.py | import math
for _ in range(int(input())):
n = int(input())
arr = list(map(int,input().split()))
temp = sorted(arr)
if all(x==-1 for x in arr):
print("0 1")
continue
pairs = []
for i in range(n):
if arr[i] == -1:
if i-1>=0 and arr[i-1] != -1:
... |
b12bc0219a529154239bcd417db44226a938f789 | 0a5441a4b0978fe700d84ae31638a22e21ebf41f | /Seccion01/readTest.py | ceb55e8e7bc2205bce1349373f67c239771f6df4 | [] | no_license | RomanCimat/test001 | 1bd5fc891641cad222dd184a6e765a82fe2b075d | 23276a18044704ea87b220f21c795d645e5a1e87 | refs/heads/master | 2023-01-06T14:48:35.077432 | 2020-11-10T01:02:47 | 2020-11-10T01:02:47 | 311,499,358 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 100 | py | readTest.py | from gurobipy import *
model = Model("algo")
model.read("Investment_min_risk.lp")
model.optimize()
|
cab7ad6ce06ebf73bab6200d8d700bdb48c0c4a4 | 4f687400ea271e994348a42ba6e657ee34525ba6 | /파일/pickle.py | bd93295cdaf94bf1378147b963f7c890ac2db8ec | [] | no_license | fhqht12331/python | f6964f1df86d2f13dab638812f0556530e6e1c70 | 02798faadfd91c3b4132a5bfdcf5abab8c241633 | refs/heads/main | 2023-08-27T16:46:44.730947 | 2021-10-28T10:38:33 | 2021-10-28T10:38:33 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 759 | py | pickle.py | import pickle
# 프로그램상 데이터를 파일형태로 저장 -> 파일을 데이터로 변환 가능하게 만듬
# profile_file = open("profile.pickle", "wb") # "wb" -> write, binary 피클을 쓰기 위해서는 binary 타입 정의가 필요
# 인코딩 설정 따로 필요하지 않음
# profile = {"이름":"박명수", "나이":30, "취미":["축구", "코딩"]}
# print(profile)
# pickle.dump(profile, profile_file) # profile 에 있는 정포를 file에 저장
# pro... |
25c09fe99570edd53e89bbd1dd83f59387d55d2a | 9700d85d3828b27f5eb87951bc729311e13de336 | /Solved/Problem A - Petrol/Problem A - Petrol.py | 995231776bf774e67af50d3ea0152bb761a3e1a0 | [] | no_license | yasinahmadpoor/QueraSolutions | ea559cfe6beba4a361afb57be726e33241906dcb | 110df7655aa53661bd77c7da34efa06881a82f67 | refs/heads/master | 2023-06-22T01:55:58.495753 | 2021-07-14T02:43:51 | 2021-07-14T02:43:51 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 140 | py | Problem A - Petrol.py | # G : Gift Puzzle
# ID : 82384
# https://quera.ir/problemset/contest/82384/%D8%B3%D8%A4%D8%A7%D9%84-g-gift-puzzle
# https://b2n.ir/q94699
|
9e13e383d9126bbaeb9965e871f8b6cfcda574d6 | dc3c88f1fe5c80147e4c52ee6ec3136307ec9702 | /navigateTo/testPoligon/findUsagesModelPoligon.py | c76dedf2e377e1335abf1d00a560573a6915ac10 | [] | no_license | ypapax/all_sublime_plugins | 062f9b9992a093a02e6b905c1329c681c8532034 | 8b10e471233bd6c2e77907cf5569b0ddccfc88f9 | refs/heads/master | 2021-01-15T21:10:08.029750 | 2015-08-16T06:32:51 | 2015-08-16T06:32:51 | 40,391,701 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 224 | py | findUsagesModelPoligon.py |
import sys
sys.path.insert(0, '/Users/maks/Library/Application Support/Sublime Text 3/Packages/navigateTo')
import navigateToModel
def find(filename, position):
navigateToModel.getObject()
# regex = "def {}".format()
|
daa7641e4557b610421725b5a7ba707a2dae25c9 | 19227badb6616af13ed7d0f2c0fb13c5ac297a99 | /handlers/h_ic.py | e27f4702f77620d807f23ae561aea44c4a100598 | [] | no_license | rmfeng/dsqfltproject | 10d0258379777593237895b2cf582975aa63ff23 | af9cf2018f6c8fc553ca38258f42a261f22b0995 | refs/heads/master | 2020-09-08T09:39:51.705282 | 2019-12-11T17:20:38 | 2019-12-11T17:20:38 | 221,096,956 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,420 | py | h_ic.py | """
handler for IC data
"""
import pandas as pd
import numpy as np
import datetime as dt
from handlers.BaseProcessor import BaseProcessor
class ICProcessor(BaseProcessor):
# specifications for raw file path and out path:
NAME = "IC"
RAW_PATHS = ['raw_data/implied_correlation_hist.csv']
OUT_PATH = 'pkl... |
8fcdbf9ffe602a0ffbbd30d98e2f1fe8547ad436 | b20ee54eb7b3187ed926242054430c97661a0aed | /Python/regex/regex1.py | 119bc34cdca2fb9cbb13fe1a3c39a82ba23e364a | [] | no_license | xiehaibin/study | f08df45414e4f9b9668a0314651acb2c09c3ce91 | 6b06d99de8d7c0ae061e4d38f640e82d43068b10 | refs/heads/master | 2021-06-04T00:38:43.443234 | 2021-04-28T05:53:40 | 2021-04-28T05:53:40 | 102,921,177 | 2 | 0 | null | 2018-03-07T06:25:42 | 2017-09-09T02:37:46 | Python | GB18030 | Python | false | false | 1,543 | py | regex1.py | "# coding=utf-8"
import re
def fun0():
str = 'read'
print(re.match('r.d', 'red'))
def fun1():
#str = "13091908176"
str = "aa13091908176bb"
if re.search('13[3-9][0-9]{8}', str):
print("移动号码")
elif re.search('13[0-2][0-9]{8}', str):
print("联通号码")
def fun2():
str = 'http/... |
c12e2606c1bd7f1106a0b95cc3b1536c8c91eb3f | 9d351ea80ac9b3953bbf710680198e09cc59a9fb | /gelidum/frozen.py | df7e8a4efd4874b2392503e77364604759a09cc7 | [
"MIT"
] | permissive | phanak-sap/gelidum | a6ffa2e1c2c090c136696c908a41bfc02e8cf7b8 | 7e1c758a010c139bf9fb23ee8f05c3498cf0e81c | refs/heads/main | 2023-06-01T07:21:31.474285 | 2021-06-15T10:03:40 | 2021-06-15T10:03:40 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,964 | py | frozen.py | import sys
import threading
import warnings
from typing import Type, List, cast, Dict, Callable
from gelidum.exceptions import FrozenException
class FrozenBase(object):
@classmethod
def __gelidum_on_update(cls, message: str):
raise NotImplementedError("Implement in derived class")
def __setattr__... |
26b5c6000767d9544e96f3550b3a0bff6dd919a2 | cf461f61e55b65c5e523f9c1993ab5b7988a68de | /novel/book/models.py | 16b89e7c9bb0546f5476f1647ccc1b535398301b | [] | no_license | Yang2891065/Novel | 09fc8bc3e4e619a4130e555d21fd9feb4e496c27 | 6da54210a641467c1cd3aa0c96f4d5b3d3cf3061 | refs/heads/master | 2020-07-25T23:21:27.705939 | 2019-09-14T14:58:24 | 2019-09-14T14:58:24 | 208,454,253 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 723 | py | models.py | from django.db import models
# Create your models here.
class Book(models.Model):
bookName = models.CharField(verbose_name='书名', max_length=50)
author = models.CharField(verbose_name='作者', max_length=50)
bookInfo = models.TextField(verbose_name='内容简介', max_length=90)
bookState = models.CharField(verbo... |
cb8ad777ceca630fe21dd2c1f5c42126f06abd99 | a4749e1906cbc6ad9010fde2d7332c664f18a8cd | /Labs/Lab_Library/lab05.py | be21dbd9cbbd001e4037a21f2d435f7275185450 | [
"MIT"
] | permissive | Levi-Strieter/Computer_Sci_110 | a165551ffcf226615cdf0034d5fcd7c4774b9731 | df12482aeff87fc9fc2de653f9f430e5259e82f0 | refs/heads/master | 2023-09-05T13:28:26.158669 | 2021-11-09T16:53:14 | 2021-11-09T16:53:14 | 400,204,443 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 312 | py | lab05.py | import cmath
def sphereSA(radius) :
return 4*cmath.pi*radius**2
# radius = 4
# print(sphereSA())
'''Practice Exam Question
a - int
b - int
c - int
'''
def root1(a,b,c):
return (-b + cmath.sqrt(b**2 - 4 * a * c)) / (2 * a)
def root2(a,b,c):
return (-b - cmath.sqrt(b**2 - 4 * a * c)) / (2 * a)
|
f0225f318ed0eae6176d6116525982f833023c5e | 7984847a263216f46f17478667a5e1e93810a91f | /multiprocessing.py | 19b6056dd2d503494db95769e3afc9a97a33aeb0 | [] | no_license | no7dw/python-learning | 41a3d4f1e7a789228c2ef74ccd60a387e9e214ee | 1d2326b1090b30074a6b86c4447ca830189e7387 | refs/heads/master | 2021-01-20T06:22:23.651694 | 2014-05-02T16:24:52 | 2014-05-02T16:24:52 | 32,405,826 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 408 | py | multiprocessing.py | from multiprocessing import Pool
def f(x):
print 'cal ', x
return x * x
def callback1(arg):
print arg
print 'result ready, in callback'
if __name__ == '__main__':
pool = Pool (processes =4)
result = pool.apply_async(f, [10], callback=callback1)
#result = pool.apply_async(f, [10])
print... |
a2627a7f792199d2d64fc5dd8ebcb4e913e0457c | dbbbc7adc2973acdd0825b7958dc3c3403435807 | /market/apps/user/migrations/0003_auto_20181119_1047.py | 0ea1537510ecc70a2f178a757b3de9d6bd6b421d | [] | no_license | wangkai111/supermarket | 56f8ab68d785a791b6854dc031aae054e201151d | e795a2f5012be1fb72fa98aef8577e1f321140af | refs/heads/master | 2020-04-07T04:34:45.333666 | 2018-12-17T07:54:02 | 2018-12-17T07:54:02 | 158,058,367 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,108 | py | 0003_auto_20181119_1047.py | # -*- coding: utf-8 -*-
# Generated by Django 1.11 on 2018-11-19 10:47
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('user', '0002_auto_20181119_0911'),
]
operations = [
migrations.RemoveField(
... |
14f309d478de6de5a0b493503176941fdfa8b702 | 23604da136e77ecf020c19ebea374c0f1e6917b8 | /main2.py | 20cb0bf2341ce370f42af28123f5cad37fcae354 | [] | no_license | gilbertfrancois/insta_camera | 6ea982b147e3ec8da2d82a344c53ecbf37c4b21e | b0fb5402e34bc1ab4f75920d8debb0b36cab1424 | refs/heads/master | 2020-11-27T11:28:50.665245 | 2019-12-21T18:17:01 | 2019-12-21T18:17:01 | 229,421,171 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 167 | py | main2.py | import cv2
import numpy as np
if __name__ == "__main__":
cap = cv2.VideoCapture()
while True:
ret, frame = cap.read()
cv2.imshow(frame)
|
9cab749b915dbb808ac105caa5287b50729f5fd9 | 0f9ab66cac58e4a2a6b06f38d7c17efb9749b4be | /dataUpload/migrations/0001_initial.py | d54a73835b45518efd8641f8ce42334a4ec63dff | [] | no_license | dinesh-joshi/RNAseqWebServer | c1aa9139fafbc95e4e1d565a3576170d88a1ec42 | 4a2ebbfe7cf90373ebd77cd6b8f2ea0b3536e0da | refs/heads/master | 2023-08-15T07:19:36.420681 | 2021-09-14T09:07:20 | 2021-09-14T09:07:20 | 406,298,337 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 766 | py | 0001_initial.py | # Generated by Django 3.2.4 on 2021-09-13 17:41
import dataUpload.models
from django.db import migrations, models
import uuid
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Task',
fields=[
... |
93e5852df00733c024a59d37699bae58bd893030 | 566d41829b41a46f28dfd376c93e7f23f8832768 | /dueros/card/BaseCard.py | bb77f8ccd771ee71ed0c47a560b7a60cae1c73e3 | [
"Apache-2.0"
] | permissive | mlzboy/bot-sdk-python | 0b8a3a789226c8a1e3313f220b864241a99d531b | 664c90ec6d0abbb0844c030cd3114693a96b12ab | refs/heads/master | 2022-04-03T18:11:18.615868 | 2020-01-14T07:53:24 | 2020-01-14T07:53:24 | 275,526,482 | 1 | 0 | Apache-2.0 | 2020-06-28T06:57:45 | 2020-06-28T06:57:45 | null | UTF-8 | Python | false | false | 1,832 | py | BaseCard.py | #!/usr/bin/env python3
# -*- coding=utf-8 -*-
# description:
# author:jack
# create_time: 2017/12/30
"""
卡片基类
"""
import logging
class BaseCard(object):
def __init__(self, field=[]):
self.data = {}
self.support_set_field = field
def add_cue_words(self, arr):
"""
为卡片添加cue wor... |
8be4bf5c1a5a7b841edc915793571686ee0bffe6 | 38400dec517862124ae05e598a02ad7f0d1c6d3b | /RemoveElement.py | a2c7b1ebca339a48c149a3765290b109a11330d2 | [] | no_license | aroranubhav/DailyBit | d84755f03c6110490b4bac7c5a9a816a1aa6b811 | 26d34c3ab60df12a60668a56422a1a4cd55d24af | refs/heads/main | 2023-04-25T06:40:12.442001 | 2021-05-13T11:42:36 | 2021-05-13T11:42:36 | 327,065,642 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 678 | py | RemoveElement.py | """
Given an array nums and a value val, remove all instances of
that value in-place and return the new length.
Do not allocate extra space for another array, you must do
this by modifying the input array in-place with O(1) extra memory.
The order of elements can be changed. It doesn't matter
... |
1de8c129769827c7fe763ce221cb9fdf8226e473 | a8b678342127aff21759b5b877d00c94234f7f7e | /BaiTap2.py | d481a0bd1d4e91777cecd4745c8db87ff402663a | [] | no_license | sonkute96/hocPython | 099c6909b64f8f49e19ec7586d95ef3588bcd2e5 | bba1e90dbe8fd12ed4632a06f3c3815ea12d0988 | refs/heads/master | 2021-01-25T00:55:55.369391 | 2017-06-18T15:48:15 | 2017-06-18T15:48:15 | 94,696,877 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 254 | py | BaiTap2.py | def TongTien(m1,m2,s):
if s <=100:
tong = m1 * s
else:
tong = m1 * 100 + m2 * (s-100)
print tong
m1 = float(raw_input("nhap gia m1 :"))
m2 = float(raw_input("nhap gia m2 :"))
s = int (raw_input("nhap so dien da dung :"))
TongTien(m1,m2,s) |
9989d31dfe13809d67f629cc283cd02ce354a74e | e8a8cc9e5c77ec2d99580cc2039b755682167713 | /alembic/versions/35f6815c3112_tables.py | 0b8638c791d6a92483f16745da8b3b43ae8df3b2 | [] | no_license | Cjames21082/Hackbright-Project--Soccer | b2cd4c4894c93bb5f16f7a48b0b42e689fbf4950 | 54ad06a5d4b0560d3d611644930b77d7dde9c5ea | refs/heads/master | 2022-05-12T04:10:42.355258 | 2013-09-05T22:33:21 | 2013-09-05T22:33:21 | 11,288,370 | 0 | 0 | null | 2022-04-05T16:22:29 | 2013-07-09T17:01:45 | CSS | UTF-8 | Python | false | false | 2,478 | py | 35f6815c3112_tables.py | """tables
Revision ID: 35f6815c3112
Revises: None
Create Date: 2013-07-28 21:15:38.385006
"""
# revision identifiers, used by Alembic.
revision = '35f6815c3112'
down_revision = None
from alembic import op
import sqlalchemy as sa
def upgrade():
### commands auto generated by Alembic - please adjust! ###
op... |
540ae4be6a41d52d9c803f829fc8b13b523b31bc | 04c25f2f8fcb7681c3ad422a9667a4409e5b6fb9 | /Components/Find and Replace Corner Components at Certain Angles.py | 48710963d81d46b302b3b5579f199d39d6631142 | [
"Apache-2.0"
] | permissive | NaN-xyz/Glyphs-Scripts | d2b31f89f6abc63b875b0d16e7a8def5bf714daa | bdacf455babc72e0801d8d8db5dc10f8e88aa37b | refs/heads/master | 2020-11-25T21:45:19.573232 | 2019-12-18T11:56:54 | 2019-12-18T11:56:54 | 228,859,288 | 1 | 0 | Apache-2.0 | 2019-12-18T14:38:54 | 2019-12-18T14:38:53 | null | UTF-8 | Python | false | false | 5,480 | py | Find and Replace Corner Components at Certain Angles.py | #MenuTitle: Find and Replace Corner Components at Certain Angles
# -*- coding: utf-8 -*-
from __future__ import division, print_function, unicode_literals
__doc__="""
Replace Corner Components at blunt or acute angles.
"""
import vanilla, math
from Foundation import NSPoint
class ReplaceCornersAtCertainAngles( object... |
91df15d6d89d070677704572d35218558317a6ec | 2d6b6204193e0e4ac419bfb4b9f580c1d5d63a72 | /zhuzhu/zz_plot.py | 5d392b1db77d9bdb04658038cf035fe880bb78b3 | [] | no_license | tangshuran/trivial_works | ceb0d55ba5a5d828674a4ad0af8d1282548578fb | f0a45476096b1eee36307800c4fef7df1bd0ad2e | refs/heads/master | 2022-05-31T16:46:34.826735 | 2022-05-07T15:32:50 | 2022-05-07T15:32:50 | 66,450,921 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 496 | py | zz_plot.py | import matplotlib.pyplot as plt
import pandas as pd
import numpy as np
data=pd.read_excel("data_SHA.xls")
fig,ax=plt.subplots()
ax.plot(data["Date"],data["HCHFI"],label="HCHFI")
ax.plot(data["Date"],data["SHA"]/2.67547,label="SSE Composite Index")
ax.plot(data["Date"],data["Hushen300 Index"]/3.20393,label="Hushen300 In... |
b38d23a7de3c805ddde4ed2d236e3c6e7bb5e2d0 | 55ef56756736f2a0a11f76de86e0a4b100111efd | /runMe.py | aede8b6d86be09738ed822705449c009489c607b | [] | no_license | fwxiong/net-sniffer | fe2d00dbf875e26a139d7c2e7b048201ae1fcdb7 | cb43e4abc24e98a9f2e0c3debde5db78ffb48eed | refs/heads/main | 2023-04-07T15:22:48.950243 | 2021-04-20T12:56:13 | 2021-04-20T12:56:13 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 247 | py | runMe.py | #!/usr/bin/python3
import os
import netifaces
# nicList = netifaces.interfaces()
NICList = [i for i in netifaces.interfaces() if i != "lo"]
for i in NICList:
os.system("sudo ifconfig " + i + " promisc")
os.system("sudo python ./src/top.py")
|
203e678d565753bb51e1bbd90ffec0f3260b22fb | e9d1cac4533c87fb94da54d7ba1713aefee38bec | /groupml/process_data.py | a0e624ee074737d9d1b0ab2b5fe6675d2dfc6590 | [] | no_license | liside/Kingpin | 92c763aa176f578d921cb04221ce17f917b6cf34 | af43e267efa01c38b9fad59acc8b55bdfa610bce | refs/heads/main | 2023-06-26T04:18:38.726581 | 2021-07-29T02:32:35 | 2021-07-29T02:32:35 | 390,572,044 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,910 | py | process_data.py | #Copyright 2020 Side Li, Arun Kumar
#
#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... |
37b1e6f0424259476699aec14f2c278ef0385a2d | 49814facf941ad999091576317510fb5bc0f6f51 | /TicTacToe/check.py | 392e680ba0c0cf56777d8cc48bbe20e10e0d994e | [] | no_license | aburmd/MiniPythonProject | 280fb49345cd65e8804ce62d0d45128ee3e88d9b | 37a3939cc45afd021968c14bd2b57e3218d84281 | refs/heads/master | 2020-12-12T02:21:01.599228 | 2020-01-15T07:53:40 | 2020-01-15T07:53:40 | 234,019,349 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 125 | py | check.py | def full_board_check(board):
return '' not in board[1:]
def space_check(board, position):
return board[position]=='' |
ec0faba5616ee8670d8420141d7c07be7819376f | 1843ee3a55434df1e2bca3fe9e78eaa83f60f2e2 | /face-hnswlib.py | 578994743105695e2d870bfde8c7a7657918c736 | [] | no_license | Rickitik/DL-examples | 1776432e2ef46c05f7dcdcaaa9645fd0f5cb0cdb | 01e472c5b2bb40bfc3d4f2af08aa45f3ee016f0e | refs/heads/master | 2023-03-13T12:52:55.182051 | 2021-03-20T18:02:43 | 2021-03-20T18:02:43 | 342,928,095 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,714 | py | face-hnswlib.py | """
"""
import cv2
import math
import os
import os.path
import pickle
from PIL import Image, ImageDraw
import face_recognition
import hnswlib
import threading
from face_recognition.face_recognition_cli import image_files_in_folder
import numpy as np
ALLOWED_EXTENSIONS = {'png', 'jpg', 'jpeg', 'JPG'}
class Index:
... |
3e709e6eb13a4e75c414121b924e26fde3601ec0 | 61e70612dc730b4372703c9ad0eb3a35d86501fd | /hpeOneView/resources/servers/server_profile_templates.py | 0eec0f39dffc40a0a14cf181482e504c920baa60 | [
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0"
] | permissive | HewlettPackard/oneview-python | 8addcfd8426c0f9873bd43307b8357e4ceb0af30 | c8afb3e24f32e3e829317552d04cd99be5ffb25b | refs/heads/master | 2023-09-01T18:14:11.588076 | 2023-08-29T10:37:02 | 2023-08-29T10:37:02 | 212,693,457 | 25 | 43 | Apache-2.0 | 2023-08-29T10:37:04 | 2019-10-03T22:35:17 | Python | UTF-8 | Python | false | false | 10,530 | py | server_profile_templates.py | # -*- coding: utf-8 -*-
###
# (C) Copyright [2020] Hewlett Packard Enterprise Development LP
#
# 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
#... |
5978b1eb52e63b00ebf52d295d15826970da887a | 1fe2130d83d393eaa6d272396d54b800fc693a86 | /Machine Learning/preprocessing.py | cc673afc2b5f5929878b489e8a055a7ed574cca1 | [] | no_license | ChiHyeongCho/DataScience | 682dce1cd1804ea2206855715ae48adde69e7b47 | ae5d46c042eb676121eefa7566f6f405b54b877f | refs/heads/master | 2023-06-06T02:58:13.574145 | 2021-06-13T08:28:29 | 2021-06-13T08:28:29 | 359,497,254 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 922 | py | preprocessing.py |
##################################################################
# 해당 소스파일의 저작권은 없습니다.
# 필요하신 분들은 언제나 사용하시길 바라며, 해당 소스코드의 부족한 부분에 대해서는
# whcl303@hanmail.net으로 언제든지 피드백 주시길 바랍니다.
# 소스설명 : 데이터 전처리를 하는 소스로 Feature Scaling, 문자열 처리 기능을 포함하고 있습니다.
# 포함함수 : train_test_split - 트레이닝, 테스트 셋 분리
##############################... |
546faf5ddf9f01cf24a19b3118d9048ee6a846e7 | 257c39b3b2f6a2029d39ebdd17ce00d1d93efa52 | /Better way52_1.py | 82af4bb1cc7809bbfee911ed251f5de7606bcb9c | [] | no_license | tigerjk726/SSAC-AIFFEL | f2c00f9ab17d3b9a27548e1b01b845e612a6be65 | 982b379852cc10e3721821d65d22c2efc5cf7616 | refs/heads/main | 2023-07-31T20:31:39.784477 | 2021-09-16T13:47:03 | 2021-09-16T13:47:03 | 404,540,616 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 466 | py | Better way52_1.py | import subprocess
# 파이썬 3.6이나 그 이전 버전에서는 제대로 작동하지 않는다.(capture_output을 사용할 수 없음)
# 윈도우에서는 echo가 없는 경우 제대로 작동하지 않을 수 있다.
result = subprocess.run(['echo', '자식프로세스가 보내는 인사!'], capture_output=True, encoding='utf-8')
result.check_returncode() # 예외가 발생하지 않으면 문제 없이 잘 종료한 것이다
print(result.stdout) #
|
e18785bd9b81a9a380353592c931c550e6a69b29 | 577f03954ec69ed82eaea32c62c8eba9ba6a01c1 | /py/testdir_0xdata_slow/test_covtype200_upload.py | e9f70762a9821a0320468aa5ea5d620c37d5e19b | [
"Apache-2.0"
] | permissive | ledell/h2o | 21032d784a1a4bb3fe8b67c9299f49c25da8146e | 34e271760b70fe6f384e106d84f18c7f0adb8210 | refs/heads/master | 2020-02-26T13:53:01.395087 | 2014-12-29T04:14:29 | 2014-12-29T04:14:29 | 24,823,632 | 1 | 2 | null | null | null | null | UTF-8 | Python | false | false | 5,330 | py | test_covtype200_upload.py | import unittest, time, sys, random, logging
sys.path.extend(['.','..','../..','py'])
import h2o, h2o_cmd, h2o_browse as h2b, h2o_import as h2i, h2o_glm, h2o_exec as h2e, h2o_jobs
class Basic(unittest.TestCase):
def tearDown(self):
h2o.check_sandbox_for_errors()
@classmethod
def setUpClass(cls):
... |
6323f7666911da5b9afab88197fa87cf59111985 | e53ed2cc0babec5c52ad4b8691ff32c74a57f019 | /gazetteer/test_settings.py | af91fe0171957cb00f1f60fde86dbca354508301 | [
"MIT",
"CC-BY-4.0"
] | permissive | NYPL/gazetteer | bf28f12c53b896acc1f805175106ccb42a71cbe1 | 708035e8d2299e70a6d3cecce40970242673426c | refs/heads/master | 2016-09-05T18:21:15.027147 | 2015-02-03T19:54:32 | 2015-02-03T19:54:32 | 18,560,844 | 5 | 1 | null | null | null | null | UTF-8 | Python | false | false | 511 | py | test_settings.py | from settings import *
#
# Settings file for use with the tests, so that they use sqlite and a custom ES index
#
#TODO - look into using spatialite if that speeds things up?
#DATABASES['default'] = {'ENGINE': 'django.db.backends.sqlite3'}
DEBUG = False #set DEBUG to 'production' mode
DATABASES['default'] = {'ENGINE': ... |
b04ed1ffb7e662288c953931a2ff38bc11801f21 | 3f21f4cd818396f56aa5d755ebfed43067c5ec95 | /List/check element.py | c2f8c7af9f1a9544e77dd7dea968e2a74affec26 | [] | no_license | Madhu-Kumar-S/Python_Basics | 925192868b4e0c8fc8bdf26af63d3aead3cc2052 | 96ca8ac86e836a695c2b3c10b72307cd5906bc8c | refs/heads/master | 2023-07-31T11:59:15.275347 | 2021-09-20T14:43:57 | 2021-09-20T14:43:57 | 367,121,462 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 620 | py | check element.py | # Python | Ways to check if element exists in list
print("Diff ways to check if the element exists in list")
def m1(l, e):
print("method 1 using in operator")
if e in l:
print("{} is in list {}".format(e,l))
else:
print("{} is not in list {}".format(e, l))
def m2(l, e):
print("method ... |
f96c1fe7fc147162bc2b3b502a84861d43109791 | 8c0a92d54ea8b8c07648d454529cba588081ce12 | /real_robots/gazebo_server.py | 7074e273e6d9d57bbf25f7f0aca5cf896c1ddc03 | [
"MIT"
] | permissive | araffin/robotics-rl-srl | 79c1e7f34b5a28367fabbe80e7cfe81e7693cd4c | eae7c1ab310c79662f6e68c0d255e08641037ffa | refs/heads/master | 2023-08-25T17:09:16.050197 | 2021-04-05T18:43:17 | 2021-04-05T18:43:17 | 118,007,580 | 590 | 102 | MIT | 2019-08-09T09:30:36 | 2018-01-18T16:23:17 | Python | UTF-8 | Python | false | false | 5,423 | py | gazebo_server.py | #!/usr/bin/env python2
from __future__ import division, print_function, absolute_import
import subprocess
import arm_scenario_simulator as arm_sim
import baxter_interface
import numpy as np
import rospy
import zmq
from arm_scenario_experiments import baxter_utils
from arm_scenario_experiments import utils as arm_util... |
65792a6d89258abacde01603f895bb9fbc571b74 | e6716510171cb1dce66813a3d29e7e8b5b3863df | /Ban_ve_may_bay/model.py | 68993cc583617d7fdb4f23f0062dbaa0455074c1 | [] | no_license | DuyTruong159/Detai | 155c64e60f3eb5ea3864e6ecc4b1a813a1e83169 | 01c1144b9118b2a2d272e5b1f50b5fd179bdea35 | refs/heads/main | 2023-03-22T12:32:19.983383 | 2021-03-11T01:53:50 | 2021-03-11T01:53:50 | 311,910,568 | 0 | 0 | null | 2021-03-11T01:42:39 | 2020-11-11T08:39:44 | Python | UTF-8 | Python | false | false | 5,086 | py | model.py | from sqlalchemy import Column, Integer, Float, ForeignKey, String, Boolean, Date, DateTime
from sqlalchemy.orm import relationship
from Ban_ve_may_bay import db, admin
from flask_login import UserMixin, logout_user, current_user
from flask_admin import BaseView, expose
from flask import redirect
from flask_admin.contri... |
f15baf1edf467d7bbf8ee6536a35d6f419be2e09 | 394742b366c0eed8997e8c4058daa1e122fffdf3 | /Lesson25/RSP/forms.py | 8b2204e538527067abe33bc663712fa2d08dd392 | [
"MIT"
] | permissive | IslamRaslambekov/HomeWork | e293468d73998f7f5e5e8f50a318546a01a6d593 | a1454c3539edf7475de686383cee8db9f1bdf448 | refs/heads/master | 2022-05-07T02:46:48.916601 | 2022-04-29T01:38:42 | 2022-04-29T01:38:42 | 243,369,694 | 0 | 1 | MIT | 2022-04-14T10:25:28 | 2020-02-26T21:29:16 | CSS | UTF-8 | Python | false | false | 248 | py | forms.py | from django import forms
from django.contrib.auth.models import User
from .models import *
class AddDoctorsForm(forms.ModelForm):
class Meta:
model = Doctor
fields = ['name', 'middle_name', 'last_name', 'title', 'image']
|
8a085e3e29c8ec3d97a20ae8020597381c1c89d2 | c07ae35b94c770cdfde26a3084ca13560a29113b | /8 kyu/The Wide-Mouthed frog! .py | e05a091c360c8f511312c8e7fda5714a2a594bcd | [] | no_license | Djusk8/CodeWars | 2f860efdf9c93e02170a61bd3345c1a6c57b85f0 | 75cdaaab3f9152032aeaa05d06ef67599aff710b | refs/heads/master | 2021-06-24T09:33:33.393342 | 2021-03-22T06:19:56 | 2021-03-22T06:19:56 | 208,574,077 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,153 | py | The Wide-Mouthed frog! .py | # ------------ KATA DESCRIPTION ------------
"""
https://www.codewars.com/kata/57ec8bd8f670e9a47a000f89
8 kyu - The Wide-Mouthed frog!
The wide mouth frog is particularly interested in the eating habits of other creatures.
He just can't stop asking the creatures he encounters what they like to eat. But then he meet... |
c22d3e242e7299f92544503c4ed021dcac2a5fd8 | e23c954455487fac48cb7350146a49762e329fb5 | /analysis/salaryForecast.py | 67bcdbf11587d4760ec9725ca8e5de72cc810aa7 | [] | no_license | Jiingtz/IndustryBigDataAnalysisSystem | 194de697d84085b53d273474a7146c69140d287a | d4b319a6c73b94d02d2a06380393dde6893c4178 | refs/heads/main | 2023-07-28T11:46:06.023140 | 2021-09-16T07:28:48 | 2021-09-16T07:28:48 | 407,062,298 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 958 | py | salaryForecast.py | # -*- encoding: utf-8 -*-
# @Time : 2021/9/7 9:05
# @Author : midww
# @File : salaryForecast.py
from .dataProcessing import *
import numpy as np
from sklearn.neighbors import KNeighborsRegressor
def salary_predict(ed, work_exp, cpy_size, job_label):
file_path = 'E:/大学学业/大四上/行业大数据分析实践/IndustryBigDataAnalysisSyste... |
c28317564c6221361b9781ebdf30cf1df670f138 | 3fe7473df377a173d5f2060805303ad20975fc21 | /ch07.py | d0c2eb28583a844f789e8adc0a620de91ec9fb9d | [] | no_license | lzhdiablo/DataAnalysis | f2e802c769e6184b820cf634d7aa7872daa63c95 | ca0b97db677c0cc6c3c57b2fa7492c25f61b4030 | refs/heads/master | 2020-03-24T03:32:29.008306 | 2018-08-16T14:44:59 | 2018-08-16T14:44:59 | 142,368,454 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,841 | py | ch07.py | import numpy as np
import pandas as pd
from pandas.io.parsers import TextParser
import csv
import json
from lxml.html import parse
from lxml import etree
import urllib
from matplotlib import pylab as plt
'''
1. merge默认inner连接,多对多连接产生的是行的笛卡尔积,也就是相同的key,结果行数为合并数据集行数的积
2. concat是轴向连接,没有数据的为空
'''
df1 = pd.DataFrame({'key... |
e8b5c4dbf93a7626908d6846b8f21c6eec39b6a5 | 18b6fa672312ab4afeed07733ffbcdaef58de075 | /Student/urls.py | 5e4f3c93462a7e0985ad735a77ee956fd00c98ff | [] | no_license | aziz2719/Student | a434dbfd856418b9a3a0f61af02cb6e954a01bb2 | 5c5e2b790ae8102afd6b8164e45fd4a59114333a | refs/heads/master | 2023-07-16T03:21:22.265778 | 2021-08-30T19:08:29 | 2021-08-30T19:08:29 | 401,456,836 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 547 | py | urls.py | from django.contrib import admin
from django.urls import path, include
from django.conf.urls.static import static
from django.conf import settings
from rest_auth.views import LoginView
from rest_auth.registration.views import RegisterView
urlpatterns = [
path('admin/', admin.site.urls),
path('signin/', LoginV... |
50e7e83dc75e38ef0af6b08d395cabeb76f0c592 | 5b0ff689a3e14f42bdf688864cae40c931a5f685 | /msa/modulos/sufragio/constants.py | 92680bb821f6c78f1a1743cbdfe1ff8d78d5ed61 | [] | no_license | prometheus-ar/vot.ar | cd7012f2792a2504fb7f0ee43796a197fc82bd28 | 72d8fa1ea08fe417b64340b98dff68df8364afdf | refs/heads/2017-ago-salta | 2021-01-02T22:19:41.591077 | 2017-08-25T11:55:49 | 2017-08-25T11:55:49 | 37,735,555 | 171 | 110 | null | 2020-06-30T13:33:49 | 2015-06-19T17:15:52 | JavaScript | UTF-8 | Python | false | false | 2,534 | py | constants.py | """Constantes del modulo sufragio."""
from msa.modulos.constants import (MODULO_APERTURA, MODULO_ASISTIDA,
MODULO_CAPACITACION, MODULO_INICIO,
MODULO_MANTENIMIENTO, MODULO_MENU,
MODULO_RECUENTO, MODULO_SUFRAGIO,
... |
f1d92b0e72fa4f03e75fa4a79e2cc16f4f79fc40 | abd3941e52aa22de291a1af83faf46dee6eb54d8 | /design_baselines/mins/__init__.py | 3b550bfb906c49a76f5453391aac2b154130c493 | [
"MIT"
] | permissive | stjordanis/design-baselines | 95c7d665515bf7b1fb752b875d7be33b9a4b6e2f | d46ff40d8b665953afb64a3332ddf1953b8a0766 | refs/heads/master | 2023-08-31T06:04:22.898425 | 2021-10-26T23:48:58 | 2021-10-26T23:48:58 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 12,419 | py | __init__.py | from design_baselines.data import StaticGraphTask, build_pipeline
from design_baselines.logger import Logger
from design_baselines.mins.replay_buffer import ReplayBuffer
from design_baselines.mins.trainers import Ensemble
from design_baselines.mins.trainers import WeightedGAN
from design_baselines.mins.nets import Forw... |
b8db8e5bbc27055cf2803e3665cd37d1895bcf6a | f8aa2844d021e65177bf445be628ad8e47e03a3a | /urls.py | 4e4fd1b3d84adb12cc74272e27dbd35fb961e562 | [] | no_license | pguther/HouseMate-Django-REST-API | 1a4629036541e1d1c8de43d1e9ea892113876c36 | 74f29c07ef5048630f6cdb1695922ba76b57027e | refs/heads/master | 2020-04-06T03:34:36.553647 | 2015-09-18T04:15:22 | 2015-09-18T04:15:22 | 41,770,721 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 782 | py | urls.py | __author__ = 'Philip'
from django.conf.urls import url
from rest_framework.urlpatterns import format_suffix_patterns
from api import views
urlpatterns = [
url(r'^$', views.ChoreList.as_view()),
url(r'^(?P<pk>[0-9]+)/$', views.ChoreDetail.as_view()),
url(r'^catchorelist/$', views.CategorizedChoreList.as_vi... |
e4d2f4f962db276f70795c4b8d678712ce478a78 | f052718ccd26f6fd4c263e9bd5129258b32d1e4f | /src/metrics/similarity_metrics.py | f18504e83ff9a591a7bd442991f07420c356e4f0 | [
"MIT"
] | permissive | YuePanEdward/Real2CAD-3DV | 2b755ce3eaaabf87c9ef9a6052603c657efb129b | 897fefb5d4a07c4f67217bd01e2f8193a098573c | refs/heads/main | 2023-09-04T07:04:47.734544 | 2021-09-08T23:06:54 | 2021-09-08T23:06:54 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,670 | py | similarity_metrics.py | from typing import List, Tuple
def split_name(prediction: str) -> Tuple[str, int]:
if len(prediction.split("_")) > 1:
return prediction.split("_")[0], int(prediction.split("_")[1])
else:
return prediction, 0
def is_correctly_retrieved(predictions: List[str], ground_truth: List[str]) -> bo... |
79b9167c55ed8f7d59a62c4ee044975e91b79c51 | d5d513d41bbf3e0e4e3872de134be2d5f9de0b65 | /Znuny4OTRSQuoteWithMarker.py | eb6cb538d8a4e22497aa77ff88c9b15db3a948f1 | [] | no_license | dodiiit/Znuny4OTRS-Sublime | 3f0a7b17edccbe023cbeed61b6e75a1bcdb77923 | 2f8ca99446480b6669d9f7c5837025893218d119 | refs/heads/master | 2023-03-04T23:15:43.061744 | 2021-02-22T11:51:04 | 2021-02-22T11:51:04 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,060 | py | Znuny4OTRSQuoteWithMarker.py | import sublime, sublime_plugin, re
class Znuny4OtrsQuoteWithMarkerCommand(sublime_plugin.TextCommand):
def run(self, edit):
# get quoting char
quote_char = None
syntax = self.view.settings().get('syntax')
if syntax == 'Packages/JavaScript/JavaScript.tmLanguage' or syntax == 'Packages/JavaScript... |
7db09a0b3943039ea39f1fffea11db3c94bcddd2 | d6de20f751e49eb5c22846249e34bb83feea2040 | /src/core/scoring/apps/local/scoring_cards/assets_cards/models.py | a46cdcd480b5144be8c28b04ac0b2cae85d607e7 | [] | no_license | daritorius/scoring-example | 48a9d3f50b755a688314a261ab1ecf02c8368ac9 | cb9fec5b710031305521d884a363d5540bcba376 | refs/heads/master | 2022-02-19T04:06:43.703460 | 2014-07-30T15:54:39 | 2014-07-30T15:54:39 | 200,102,774 | 0 | 0 | null | 2022-01-06T22:36:18 | 2019-08-01T18:43:55 | Python | UTF-8 | Python | false | false | 8,212 | py | models.py | # -*- coding: utf-8 -*-
from core.main.base.BaseModel import BaseModel
from core.main.base.scoring.cards.BaseScoringCardModel import BaseScoringCardModel
from django.db import models
from django.utils.translation import ugettext as _
class BaseAssetStatusCard(BaseModel):
REPAIR_STATE = 0
NORMAL_STATE = 1
... |
b1ee6a1b3006445ffe1d357f618fc31521ed5160 | f4e202a0abc8436b78d4f199564d479cd1638c15 | /Protein_Adsorption/Code/test_Garcia_model.py | 817d588b46e0858ad1eed6c07452dc7d58866749 | [] | no_license | cfinch/Dissertation | 7dd3c4b01925a7fc95cf8f6538577198cab775ab | 269256631158578bfd781645987eb905b6bddad0 | refs/heads/master | 2016-09-05T12:10:32.080222 | 2011-11-17T22:07:31 | 2011-11-17T22:07:31 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,645 | py | test_Garcia_model.py | #!/usr/bin/env python
from Surface_Reaction_Tools.theoretical import Garcia_kinetics, \
Langmuir_transition_kinetics
from numpy import *
import matplotlib.pyplot as plt
NA = 6.022e23 # molecules/mole
M = 39e3 # g/mole
A_total = 0.0075 # cm^2
f = NA/M/1e9
c = 10 * 1000 # ng/cm^2
times = arange(0.0, 12... |
e14fdc9988cd7d8d54999154f34acc5c40f95b7e | 4007ea25754f866c51d5ce6379b2a07483909d6c | /POS/config.py | 765ba2111acef4428ff5e955baf82aa7cc482067 | [] | no_license | EddyMM/lipa-less | f8c80930a40e5e0a2f94ab899cb122e2229e23fe | 37ccb071791324e39eee015fffa5e5c5b6ea0a85 | refs/heads/develop | 2022-07-08T07:39:08.516330 | 2019-07-04T15:42:19 | 2019-07-04T15:42:19 | 195,266,407 | 0 | 1 | null | 2022-06-21T22:15:35 | 2019-07-04T15:34:42 | JavaScript | UTF-8 | Python | false | false | 747 | py | config.py | import os
import redis
from .constants import APP_NAME, DATABASE_URL, TESTING_DATABASE_URL, REDIS_URL_ENV_VAR, LOCAL_REDIS_URL
class BaseConfig(object):
SQLALCHEMY_DATABASE_URI = DATABASE_URL
SECRET_KEY = os.environ.get(APP_NAME + "_SECRET_KEY")
SESSION_TYPE = "redis"
SESSION_REDIS = redis.from_url... |
5f34e5b8b78645372f60f0191787e277cb79e303 | e92cf301cfd37c907711adcbe89ce1a2bd350d10 | /onisite/settings_base.py | a0a0585e2aec400d31b0bac065cbfab33bed3a69 | [
"Apache-2.0"
] | permissive | open-oni/open-oni | 7ce91eb4b4d6fccef2413bc72207fda15e7fc08b | 897b542c31d612a138c3e449d1491924c02a0c3d | refs/heads/dev | 2023-09-01T19:59:15.130361 | 2023-07-14T20:32:47 | 2023-07-14T20:32:47 | 39,592,974 | 47 | 25 | NOASSERTION | 2023-09-06T22:27:19 | 2015-07-23T21:08:36 | Python | UTF-8 | Python | false | false | 10,274 | py | settings_base.py | import os
from .django_defaults import *
################################################################
# DJANGO CUSTOMIZATIONS
################################################################
# https://docs.djangoproject.com/en/3.2/releases/3.2/#customizing-type-of-auto-created-primary-keys
# Maintain past default... |
449f688932cecf0b7e6dba01be681ff048cd8be3 | 55c250525bd7198ac905b1f2f86d16a44f73e03a | /Python/Scripts/Lazymux/sqlmap/plugins/dbms/cratedb/fingerprint.py | 7b74e2905ceca6ef8b142cc3ad89ad0ffac00e66 | [] | no_license | NateWeiler/Resources | 213d18ba86f7cc9d845741b8571b9e2c2c6be916 | bd4a8a82a3e83a381c97d19e5df42cbababfc66c | refs/heads/master | 2023-09-03T17:50:31.937137 | 2023-08-28T23:50:57 | 2023-08-28T23:50:57 | 267,368,545 | 2 | 1 | null | 2022-09-08T15:20:18 | 2020-05-27T16:18:17 | null | UTF-8 | Python | false | false | 129 | py | fingerprint.py | version https://git-lfs.github.com/spec/v1
oid sha256:72015b5a11b8b1ef97a626cf431920ecd02fba8c7cf0230c61fdefb0626d94df
size 2531
|
6c35f46f89f004cb17d23cf07caf5ca473393f12 | 40a2c61017329980f0861bf9b59ba4c8c19e8d09 | /cv_to_pdf/urls.py | e36ede8663e9963d15286718ef27ba880c8e907c | [] | no_license | MaximLomaka/Curriculum-vitae | 169cf0f3e6c7072c8d9c02a3c3b7a6bde3fd4384 | 4fcd97d01fddacb0ce4a48ab5133c482370edf30 | refs/heads/master | 2020-03-20T14:01:02.374723 | 2018-06-14T08:37:22 | 2018-06-14T08:37:22 | 137,473,273 | 0 | 0 | null | 2018-06-15T10:13:39 | 2018-06-15T10:13:39 | null | UTF-8 | Python | false | false | 668 | py | urls.py | from django.urls import path
from cv_to_pdf.views import *
app_name = 'cv'
urlpatterns = [
path('home/', DepartmentList.as_view(), name='department'),
path('home/department_<int:pk>/', DepartmentView.as_view(), name='department_detail'),
path('home/department_<int:pk>/group_<int:group_id>/', GroupView.as... |
afd1851c378f17e93c2b0f8f87ed9f560f49f609 | 3696c5981dbe5d472d035d7bcb5132fd5f51fcc8 | /lambda/create-collection.py | 582f5691026be5164cafb618e420aaa07d0741d2 | [] | no_license | brieucthomas/aws-sample-rekognition | 40e612921d894e123586b989bd269e0782de08b6 | ccdd57be0b489142ce7403bd457f3f1c65d53040 | refs/heads/master | 2022-11-27T10:12:22.949354 | 2020-01-09T12:33:16 | 2020-01-09T12:33:16 | 232,804,441 | 0 | 0 | null | 2022-11-22T04:58:38 | 2020-01-09T12:31:26 | Python | UTF-8 | Python | false | false | 1,395 | py | create-collection.py | import boto3
import json
import logging
import traceback
import os
print('Loading function')
collection = os.environ['REKOGNITION_FACE_COLLECTION']
rekognition = boto3.client('rekognition')
logger = logging.getLogger()
def lambda_handler(event, context):
print('received event:' + json.dumps(event, indent=2))
... |
e81eaaf9706e24bb2c880234b2a85e1c01455dd7 | edb17d7eb731810bc6c6ca88b50d58c2a49feee3 | /flask_security/__init__.py | e78be5185c823600d551a19f3e7d522e6f40f179 | [
"MIT"
] | permissive | inveniosoftware/flask-security-fork | c9eb75a9ade6501166d970cb214f1af34a4b5c33 | 9541bbe7db618eae795bda772729514929c39c9d | refs/heads/master | 2023-08-08T20:12:49.986305 | 2023-05-24T21:51:33 | 2023-08-07T19:42:05 | 72,115,457 | 31 | 21 | MIT | 2023-08-07T19:42:07 | 2016-10-27T14:19:12 | Python | UTF-8 | Python | false | false | 2,042 | py | __init__.py | # -*- coding: utf-8 -*-
"""
flask_security
~~~~~~~~~~~~~~
Flask-Security is a Flask extension that aims to add quick and simple
security via Flask-Login, Flask-Principal, Flask-WTF, and passlib.
:copyright: (c) 2012 by Matt Wright.
:license: MIT, see LICENSE for more details.
"""
# Monkey pat... |
e179d16964923793757a3af0c3254846cbb5c27f | e877708f02084b84d5235821d2400da7fc022fb6 | /get_facebook_data.py | 0cb1fb18e103d6547c40439059fbcdb5decc15ec | [
"CC0-1.0"
] | permissive | FuckBrains/tw-fb-yt-datacollection | 3bee15ab1ff5172480f04217e6f3572a76d4a562 | 1417883f6b43fc435b9d911ba1237fa2cd40cb4e | refs/heads/main | 2022-12-20T13:38:57.767257 | 2020-10-07T20:02:56 | 2020-10-07T20:02:56 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,187 | py | get_facebook_data.py | from facebook import GraphAPI
import pickle, requests, time
from facebook_scraper import get_posts
#Downloads comments from a Facebook page
#Note you need to be authorized properly to access the posts
page_token='YOUR_PAGE_TOKEN_HERE'
ct=0
#Download all the posts from the relevant page
postlist=[]
for post in get_p... |
e2ca3eb71bf6078559030323c4466c65bc5e3904 | 764a1c340ec6575eae7b7182af507a505087f24f | /app/seeds/games.py | 5e34a1a7e2c0ca7f4d8e0026db4b083170f64d2b | [] | no_license | JoshuaJDevine/scratch.io | 19da968bc9dd20abea548f03bff898ccc5c0606a | d96dd047f13a4d29a990a551f2fc5b8f253980f3 | refs/heads/main | 2023-06-16T12:05:27.250080 | 2021-07-12T20:42:43 | 2021-07-12T20:42:43 | 368,685,790 | 0 | 1 | null | 2022-07-21T16:54:39 | 2021-05-18T22:54:43 | Python | UTF-8 | Python | false | false | 1,406 | py | games.py | from app.models import db, Game, User, Team, GameJam
from faker import Faker
import random
faker = Faker()
# Adds a demo user, you can add other users here if you want
def seed_games():
nameList = ["Ghezhoss", "Acnujhi", "Iacniloxz", "Quaker Arena", "Candies", "Crusher", "Sweet Smasher", "Datoka Jones", "Immorta... |