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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
e03d986e50e0e22e119caa28f58068cdeb80287c | 2c5a7b4a5d429fd6e3d998ff55a159e7c7641ddb | /RockPaperScissors.py | f3361c85fd28a763ee9dd17ad3194918150cf414 | [] | no_license | GHarte/RockPaperScissorsPython | f95d1ec6eb6001f2b23208a2d47bd0847eb7dee9 | 95c409b151f1888b79491a586ad45b3d5575cef7 | refs/heads/master | 2020-06-02T04:19:27.464884 | 2013-07-14T16:57:29 | 2013-07-14T16:57:29 | 11,406,002 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,035 | py | RockPaperScissors.py | #author: Gareth Harte
import sys
from tkinter import *
import tkinter.messagebox
from random import randrange
root = Tk()
root.geometry('300x150+0+0')
playerChoice = StringVar(None)
result = StringVar(None)
win = 'You win'
tie = 'Its a tie!'
lose = 'You lose'
scissorsgif = PhotoImage(file="scissors.gif")
papergif = ... |
16787bad5746b6b0bd52b85ec30383ea3c674a4c | 4174130cb780f70684e6b2a45843bb2b53536b45 | /seeninic/nic/nic/views/default.py | 1769be70eaa74ec3b63847ed2c3cb97b0637c95d | [] | no_license | suhanthan-1997/thenovel | 023efcda61ca5251654f7a0be6b8b8dcc42a5a55 | 3c2d5e3254cff9bb45d54959233798adb3a32132 | refs/heads/master | 2021-01-18T12:52:02.102781 | 2017-08-15T10:31:28 | 2017-08-15T10:31:28 | 100,366,548 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,822 | py | default.py | from pyramid.response import Response
from pyramid.view import view_config
from pyramid.renderers import render_to_response
from ..models import login
from ..models import newsfeed
from ..models import admin
from ..models import count
from ..models import report
from ..models import blocklist
from sqlalchemy import des... |
16abb29efab4ba2431a010b23296e0b6d0a19d6e | 96e48cd780560e8e51332f27931ab9dcd481affa | /data.py | cac1f093889d1bc7d26a97fcc761f64de0b64a55 | [
"MIT"
] | permissive | adieyal/name-classifier | 8c16acedb4ec0700673bccf93b2f2c0d8aa12c63 | aa7e5aec57d9bb78e6b9119b5e921b0fc888f4c6 | refs/heads/master | 2022-12-13T01:22:06.969147 | 2020-10-20T20:25:08 | 2020-10-20T20:25:08 | 131,285,250 | 1 | 0 | MIT | 2023-08-16T22:47:39 | 2018-04-27T11:01:25 | Python | UTF-8 | Python | false | false | 2,934 | py | data.py | import os
import sys
from collections import Counter
import glob
import logging
import features
import random
import numpy as np
from tqdm import tqdm
from numpy.random import choice
logger = logging.getLogger(__name__)
logging.basicConfig(
level=logging.INFO,
format='%(asctime)s %(levelname)s %(message)s'
)
... |
11e403feb9cdd3a17f54af79d87c19288da265b8 | 3d798284c7b13b03d7ac2a603ce520e241132c6b | /model/charcnn.py | b641d8949243fa050551c72b71359f47b4444c20 | [] | no_license | xiongshufeng/language_model | e3255ee226dfa538d732fc94a69c19f1e2455782 | d70d38e7fdcf2a84e0e01fd86d0024c82d01c4a7 | refs/heads/master | 2022-05-12T23:56:53.522752 | 2018-02-01T01:20:37 | 2018-02-01T01:20:37 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,686 | py | charcnn.py | """
In this module, we will implement the basic model for constructing Character level
language model;
which includes a CNN, a HighWay, a lstm
"""
from __future__ import absolute_import
from __future__ import print_function
from __future__ import division
import torch
import torch.nn as nn
import torch.nn.functional ... |
d7fb46f5bc780f21595f9862787602e932e4da15 | 46d4a07dcef071fc944a31ada8d1689aea6da727 | /pycqed/instrument_drivers/physical_instruments/ZurichInstruments/wouter/UHFQuantumController.py | 5a6b41d40d3a4e09306a9d7cb2670909041c8150 | [
"MIT"
] | permissive | fadinolf/PycQED_py3 | 448da0f688cfe0c10bc7e3b73eeb509e6426d63f | 5385ae0d14dcbd2aef55fa056bed427a2cea7518 | refs/heads/master | 2022-10-26T14:48:52.306275 | 2019-08-07T07:23:04 | 2019-08-07T07:23:04 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 61,336 | py | UHFQuantumController.py | """
To do:
- split off application dependent code, as done for ZI_HDAWG8.py
Notes:
- this driver builds on zhinst.ziPython and zhinst.utils directly, whereas the HDAWG driver inserts zishell_NH and
ZI_base_instrument on top of these.
- some code (get*, set*) in this driver resembles code in zishell_NH and ZI_base_in... |
bf9657887bbda1e9d10f2830a0a2f2dbd0517856 | b32e55e5661353e7fd95dce6378afae2097fa0d1 | /app/views.py | bc0abcae98371a46066823181b5993049775ec3e | [] | no_license | ivancarrancho/Djangonosvamos | 57b56032bd810525b7ad443497604797070d37aa | 8f63675def2d8975cf9c0f50329fd23abbe8691c | refs/heads/master | 2020-04-04T22:18:59.995122 | 2018-11-15T23:58:26 | 2018-11-15T23:58:26 | 156,319,308 | 0 | 1 | null | 2018-11-15T23:58:26 | 2018-11-06T03:17:20 | Python | UTF-8 | Python | false | false | 4,675 | py | views.py | import json
from django.http import Http404
from django.shortcuts import render
from django.utils import timezone
from django.views.decorators.csrf import csrf_exempt
from django.views.generic import DetailView
from django.views.generic import ListView
from django.views.generic import View
from django.http import Json... |
44eebb680b2ae5d0bcce9b40388798b73bf6272d | e3a2648d28337587870fe975049d84eaf5863310 | /flask_api/run_api_server.py | f6e0090ade280337d65d093dc142113f09357ee3 | [
"MIT"
] | permissive | DmitryFleur/vafr | ac92addb5bb77542f97e380ffbb52d70c5cfe886 | 68069c67d41a8ce434e97079d9b1a2dfdf5acb51 | refs/heads/master | 2021-05-07T23:46:27.699507 | 2017-06-23T22:43:37 | 2017-06-23T22:43:37 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 154 | py | run_api_server.py |
from apiserver import app
def runserver():
app.run(host='0.0.0.0', port=8000, debug=app.config['DEBUG'])
if __name__ == '__main__':
runserver()
|
39c49bda50d96945c98e8c80ac913c63777a4e31 | 79b4ec449a50a6251101e4eed0f2942a1320a382 | /verification_test1.py | 7fb03633edff3497046f3d9617051800ae2943d6 | [] | no_license | christophviehoff/pythonProject | 2f21e440dc4250bee494dc317f7ec72b8ef91cd5 | 0c86a36b669ceff304cf8c40d0f211287b25b257 | refs/heads/master | 2023-03-24T14:45:04.926753 | 2021-03-14T23:33:20 | 2021-03-14T23:33:20 | 347,779,050 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 77 | py | verification_test1.py | import torch
x = torch.rand(5, 3)
print(x)
print(torch.cuda.is_available()) |
893966b65a17cb7c71bae1feea0a2fa8e4b7f581 | 92c586573ff7db754aa390ca6c028aec0c39aa0d | /crm/views/news/news_project/__init__.py | 9f21ee84d7d214476bc3bc2e61fa3b2b114a8137 | [] | no_license | vovapasko/crm | b7784ac7f1984a26a955b178ebefea0c03c9ad6a | bab909324aa2e4c1c8fff72093d3fcf44aaf4963 | refs/heads/master | 2023-02-10T10:39:40.789246 | 2020-11-20T18:30:01 | 2020-11-20T18:30:01 | 326,683,996 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 56 | py | __init__.py | from .news_project_list_view import NewsProjectListView
|
ad8e9aa3aa574705fab78d1c3c7c8e6f47fc93aa | 9f3f2c5a4fca4014c2aa0b50099ec99c5bb77dfc | /encryption.py | 055a4db770b18ba9898d68b1c777088bb03f00f4 | [] | no_license | 2020blee/Codewars-Path-Finder | 4ec43ea87b7bec116b789ee7cb3b1983c851f00b | 16487b05b46759433873fb1315b77b249e332a5f | refs/heads/master | 2020-04-21T19:50:49.223248 | 2019-05-31T09:17:17 | 2019-05-31T09:17:17 | 169,821,779 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,360 | py | encryption.py | def encrypt(text, encryptKey):
region_1a = list("qwertyuiop")
region_1b = list("QWERTYUIOP")
region_2a = list("asdfghjkl")
region_2b = list("ASDFGHJKL")
region_3a = list("zxcvbnm,.")
region_3b = list("ZXCVBNM<>")
encryptKey = list(str(encryptKey))
new_encryptKey = []
#encryptKey is a... |
65d2248229765fe006b334d94b12d0b413eec08a | c815865eed0b337140e5acf33d262d30acb9d594 | /main/route.py | 5144085e885d238ca3a9ee8134f7ae54acfd3ef4 | [] | no_license | Israel-Ogunsua/foody | b67ec7cbd190c0f38a26422746f24d952bb76c44 | 222f845817d1ee5ec5aa227f5d377ff9bc4dc762 | refs/heads/master | 2023-04-20T03:30:15.063454 | 2021-05-02T00:32:27 | 2021-05-02T00:32:27 | 363,531,542 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 553 | py | route.py | from main import app
from flask import render_template, url_for
from main.form import loginForm, registrationForm
@app.route("/")
def home():
return render_template("index.html")
@app.route("/login", methods=["GET","POST"])
def login():
form = loginForm()
return render_template("login.html", form = form)
... |
5535e76b37db998e71ed1bc88ddd4a4c5925717a | e3365bc8fa7da2753c248c2b8a5c5e16aef84d9f | /indices/frostbitten.py | ae1f27ae974561af8d18d47787e331f987f34ed6 | [] | no_license | psdh/WhatsintheVector | e8aabacc054a88b4cb25303548980af9a10c12a8 | a24168d068d9c69dc7a0fd13f606c080ae82e2a6 | refs/heads/master | 2021-01-25T10:34:22.651619 | 2015-09-23T11:54:06 | 2015-09-23T11:54:06 | 42,749,205 | 2 | 3 | null | 2015-09-23T11:54:07 | 2015-09-18T22:06:38 | Python | UTF-8 | Python | false | false | 121 | py | frostbitten.py | ii = [('RennJIT.py', 1), ('MartHSI2.py', 1), ('CoolWHM.py', 1), ('BackGNE.py', 3), ('CoolWHM3.py', 2), ('FitzRNS.py', 3)] |
3f0b7c2a3c6ac4415028c4afa62d258305ef2bfa | 85aabe6420406959090e37c880868f0803bcdd9c | /answers/answer10.py | 4dcf449c616d2f6d607130bdca85678810c9b89c | [
"Apache-2.0"
] | permissive | obaf/python-pandas-workshop | 2b7258f328912e7ac9469915da3a573a0d65cca6 | 80ef4c0cb3f9c81f76330a4d7c0a8084231aacf2 | refs/heads/master | 2020-08-31T22:13:51.883367 | 2019-10-29T18:50:33 | 2019-10-29T18:50:33 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 122 | py | answer10.py | pockets = jeans['BackArea'].groupby(jeans['menWomen']).mean()
ax = pockets.plot.bar();
ax.set_ylabel('Back Pocket Size');
|
a7c3b124430bcc689d4cc4892c4a50558a60f2e0 | f68c14b211f78cb470c2b4dcf60544fac70653a2 | /notebooks/source/prim_all_lsg.py | d09d9e847cc523e275f604fa816dac619fc71fba | [] | no_license | fuenfundachtzig/Pythonkurs1 | 061f997066464d78e9ff5335e9a3f7d2649b59ea | 9b9823da3dbfaa53d579f2158794984fefa5b239 | refs/heads/master | 2021-11-21T16:09:38.334515 | 2021-08-24T07:24:08 | 2021-08-24T07:24:08 | 243,536,256 | 1 | 1 | null | 2021-09-22T18:39:02 | 2020-02-27T14:14:44 | Jupyter Notebook | UTF-8 | Python | false | false | 458 | py | prim_all_lsg.py | #!/usr/bin/env python
import math
num = int(raw_input("Enter a number: "))
i = 2
loops = 0;
primes=[]
for testnum in xrange(2,num):
i = 2
prim = True
#while (i < math.floor(math.sqrt(testnum)+1)):
while (i < testnum):
loops += 1
if (testnum%i)==0:
prim = False
... |
78a76a0b8109422993222c572f2c98092e37fe75 | cc60fa417ce00d822593bbe904b1476915fc3661 | /authenticate/forms.py | 3d65355f927a165fcaaf5b547dd0e4f7d8486bd9 | [] | no_license | Srikanth-SM/bookShelf | 2b8fa048569b012a4fe6cfb9817bb11c16e162d8 | a6d23c44712934810035ac64acc77f9f9f2702a4 | refs/heads/master | 2020-04-12T02:07:40.183532 | 2018-12-27T13:47:20 | 2018-12-27T13:47:20 | 162,238,815 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,022 | py | forms.py | from django.shortcuts import render, get_object_or_404
from django import forms
from django.contrib.auth.forms import UserCreationForm
from django.contrib.auth.models import User
# def UserForm(request):
# name = forms.CharField(label='name',max_length=100)
# return render(request, 'polls/userForm.html', {'form': name... |
92142b65fa20d62ec5a1d5810d1b9d9c36b2e96e | 57e830d26fab1bcc534fe43cc35ff98c62403e49 | /hyper_and_conf/hyper_optimizer.py | 979a23bbb52ebea831ea69521e0f5e0dbfbf440e | [] | no_license | JZX555/AVNMT | 60b8e1dcb8d546e43b0c961f7f5474f5927cc240 | 25f314f2f66088c33c8a036ba962acdb7c8711ca | refs/heads/master | 2022-07-20T15:41:00.142477 | 2020-05-14T05:28:18 | 2020-05-14T05:28:18 | 263,823,459 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 19,624 | py | hyper_optimizer.py | import numpy as np
import tensorflow as tf
import re
from tensorflow.python.framework import ops
from tensorflow.python.ops import control_flow_ops
from tensorflow.python.ops import math_ops
K = tf.keras.backend
class LazyAdam(tf.keras.optimizers.Adam):
"""Variant of the Adam optimizer that handles sparse updates... |
f3383130e84cbfec8d279512a60d091023e4dc7f | 0df1e462a466fa34fb4a2e9a57bb92097c70235b | /utils.py | 9138b11ccfefe6a55c92d758846cdc76030745f7 | [] | no_license | piy1708/ire_project | b0249c20fb4980a10d2a402b8957c129cc9acd88 | b697b50e89350c3c3d0b644dfde9140df1c92471 | refs/heads/master | 2021-05-07T01:46:01.826105 | 2017-11-12T18:13:28 | 2017-11-12T18:13:28 | 110,420,650 | 2 | 2 | null | null | null | null | UTF-8 | Python | false | false | 3,873 | py | utils.py | import numpy as np
from contextlib import contextmanager
import operator
def softmax(logits):
"""Compute softmax values for each sets of scores in x."""
return np.exp(logits) / np.sum(np.exp(logits), axis=1, keepdims=True)
def argmax(prob):
"""Return argmax id"""
prob = prob.ravel()
return np.argm... |
5100919296d55285428275a7d413be032a0d7306 | 5024466503f5fdc440da135e4d6869ffab9d91f1 | /src/simple_biped/movements.py | 5e0c6aafbeee8c8e6470f9508caa8007eba2b09e | [] | no_license | ristofer/simple_biped | f73930e44e5022ba27922e85d534ddab649c3823 | ada0dfa8e4b488d2e1b0bc3a99d0f587d150f4a7 | refs/heads/master | 2021-09-05T20:13:14.251581 | 2018-01-30T20:22:38 | 2018-01-30T20:22:38 | 110,568,164 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,122 | py | movements.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Joint space control using joint trajectory action
"""
__author__ = "Cristopher Gomez"
import copy
from threading import Lock
import numpy as np
# ROS Core
import rospy
import actionlib
import math
import rospkg
# ROS Messages
from sensor_msgs.msg import JointState
from... |
259826b03ed88de0c1879e8b379b891ec26e78c4 | 8d78d4e63223d7ab810cbe71ac1bd3590099f1b9 | /action_processing/actions/explore_action.py | 89a634f234d7ee26fccac3ab3db5a3d4946d894a | [] | no_license | KirylShakh/Roguelike-ROP | d780901cdd4dba9649835a75284d7f05f8ed3fef | 01374b33599cf12e6d8f50f6a8892c4ae0450d47 | refs/heads/master | 2023-01-10T11:18:38.088381 | 2020-08-25T14:11:57 | 2020-08-25T14:11:57 | 312,552,104 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 686 | py | explore_action.py | from action_processing.actions.action import Action
from action_processing.actions.info_screen_action import InfoScreenAction
from game_states import GameStates
from player_locations import PlayerLocations
class ExploreAction(Action):
def run(self):
if self.engine.player_location != PlayerLocations.WORLD_... |
eba60cb06850c5e80f8b485ebac1ca7f8909c44b | 6163d7097ed2fb8fd2dc11e08d2c5a91ee1a882b | /Assignment1/Vishnu_206106025/A1_Q3.py | ea19ee10ed5bb72a504756d143ac3e23e7500089 | [] | no_license | pankajiitg/EE524 | a7f47b4e21e33bbdfdffda9a6e035e57a28540d4 | 7c40ed3c973082f13007db23d3a79562f682f27f | refs/heads/master | 2023-01-22T16:07:37.439674 | 2020-10-10T17:19:15 | 2020-10-10T17:19:15 | 299,058,223 | 1 | 0 | null | 2020-12-04T18:10:45 | 2020-09-27T15:12:27 | Jupyter Notebook | UTF-8 | Python | false | false | 398 | py | A1_Q3.py | # -*- coding: utf-8 -*-
"""
Created on Wed Sep 30 14:27:43 2020
@author: keyen
"""
def factorial(num):
fact=1
for i in range(1,num):
fact=fact*(num-i+1)
return fact
print("This program will calculate the factorial of a given number")
number=int(input('Enter a number ... |
c893095be88636e6cb06eb3b939d8106fbb7a8ca | 61530af2c6455158aa77e6d2f6b1803aeeebad7d | /ArushiPatelTermProject.py | 9b2f562ad8a9d5b61ca9479b327a860bd8662bbd | [] | no_license | arushipatel97/15112-Term-Project | 1a1ae2ff9c3b22757fe9c3228c9a9c418e60ff63 | b679034eb0254c9f9c958e5349286ace9c582b7a | refs/heads/master | 2021-01-15T10:35:21.472528 | 2017-08-07T15:06:18 | 2017-08-07T15:06:18 | 99,590,495 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 57,304 | py | ArushiPatelTermProject.py | #Arushi Patel (aruship)
from tkinter import *
import random
######################################
#images taken from wikipedia,pixabay,
#trans americas, clipartpanda,pngimg,
#findicons, microsoft word
######################################
####################################
# init
#####################... |
d0448ca8e3fd2f3bb8a3a7ec052e29ab0be6351a | 2508721d9ca79df22127efb7875d6d4cc465ef56 | /sklearn/pcaVsLda.py | af1516ae72ae6c9f6023f23e538527d86c6593eb | [] | no_license | andrew172839/machineLearning_Python | ca60f19e7cffda1168a44bc2da9feec5d6b2a06b | d671a91355f5ab1c9a867c78cd9cf58c5d7c523e | refs/heads/master | 2018-09-18T15:38:11.967313 | 2018-08-28T06:08:42 | 2018-08-28T06:08:42 | 108,866,350 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,413 | py | pcaVsLda.py | import matplotlib.pyplot as plt
from sklearn.decomposition import PCA
from sklearn.discriminant_analysis import LinearDiscriminantAnalysis
import pandas as pd
import numpy as np
from sklearn import datasets
from sklearn.datasets import make_classification
from sklearn.model_selection import train_test_split
# a = pd.... |
6d7db5b9a64ec25763f5af6ceec1a46d629d549c | 1cdcd38d5056b9543805b368d75c08bb9b4ca7e6 | /main.py | 3d534f4ca7cfb427740e1fff50a3acf638001477 | [] | no_license | minnela/IntroductionNaturalDataProcessing | 3214106469c810e4e73d682e3e80f66d85038d40 | 6fca6618b4d2c1dd92a1871096122b998c0ddbdd | refs/heads/master | 2023-01-08T05:19:50.215935 | 2020-11-14T11:56:25 | 2020-11-14T11:56:25 | 312,805,199 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,476 | py | main.py | import re
import ngram
import smoothedNgram
def split_into_sentences(text):
text = text.lower()
sentences = re.split(r'(?<!\w\.\w.)(?<![A-Z][a-z]\.)(?<=\.|\?)\s', text)
getSentences(sentences,text)
return sentences
def getTextWithoutSpaces(text):
withoutLineBreaks = text.replace("\n", "")
withoutS... |
654586443e96f84aae70b3ce3263b0458a27334b | 555b9f764d9bca5232360979460bc35c2f5ad424 | /google/ads/google_ads/v1/proto/services/user_interest_service_pb2.py | 929b75d1adc023ce1c9ba303cfb51bc4c2ad7670 | [
"Apache-2.0",
"LicenseRef-scancode-generic-cla"
] | permissive | juanmacugat/google-ads-python | b50256163782bc0223bcd8b29f789d74f4cfad05 | 0fc8a7dbf31d9e8e2a4364df93bec5f6b7edd50a | refs/heads/master | 2021-02-18T17:00:22.067673 | 2020-03-05T16:13:57 | 2020-03-05T16:13:57 | 245,215,877 | 1 | 0 | Apache-2.0 | 2020-03-05T16:39:34 | 2020-03-05T16:39:33 | null | UTF-8 | Python | false | true | 4,893 | py | user_interest_service_pb2.py | # -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: google/ads/googleads_v1/proto/services/user_interest_service.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf import descriptor as _descriptor
from google.protobu... |
7bd2a29bff1e435cf813dd54109d7f4e17612425 | 8de20274ec1cd5b18e65582ccee92a931ccab135 | /Graph.py | 503efdd68799bf5dafa82a769f6a1e399bbb568d | [] | no_license | Jonathan-Rasch/tinyTensor | 30c150be062e24aebd163b426f7488f90101d7de | 2cfd387a25ded68f5d76003af9e757348db004b1 | refs/heads/master | 2020-03-08T22:24:11.580442 | 2018-04-09T19:05:42 | 2018-04-09T19:05:42 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,256 | py | Graph.py | #from tinyTensor.Node import Node
import tinyTensor
import plotly.plotly as py
from graphviz import render
#from tinyTensor.Operation import Operation
def init():
global _default_graph
_default_graph = None
def postOrder(node):
nodes_postorder = []
def recurse(node):
if isinstan... |
22da05d9bf6139a0306bfb2d1df96e9e2cf6a0c6 | 7e79b8ebb396c40dd3d8169e93d39649cf2e71f9 | /django_mises/users/views.py | 4f6171b620250304bb18f52cc163caf5a41ac7b5 | [] | no_license | mjtorn/django-mises | 5fb949a1479e3aec023d7fa6e2fe7915d35f2d7f | 8a179f64b6b53fd8f5210b8e81ebd1c60c33e7e2 | refs/heads/master | 2021-01-23T22:05:58.540499 | 2012-10-21T18:47:58 | 2012-10-21T18:48:11 | 1,159,809 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,324 | py | views.py | # vim: tabstop=4 expandtab autoindent shiftwidth=4 fileencoding=utf-8
from django.contrib.auth.decorators import login_required
from django.contrib.auth import models as auth_models
from django.contrib.auth import forms as auth_forms
from django.contrib.auth import authenticate, login
from django.core.urlresolvers i... |
40158bbfd9c95a8344f34431d0b0e98c4a1bf6ed | b5407596bb666bee88dd559b1c8c49302e8d1598 | /mlp-mmdgm/run_gpulearn_mm_z_x.py | 26b7cad6070d96cd7560caf5a081de6a52c84e10 | [
"MIT"
] | permissive | zdltheone/mmdgm | 2739ccab5618b98d2cd9f93b7ee497893cb27634 | 9422bdc88b913c09506944d3529f6f955b95687c | refs/heads/master | 2021-01-12T22:18:55.729836 | 2015-09-29T05:08:46 | 2015-09-29T05:08:46 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,236 | py | run_gpulearn_mm_z_x.py | '''
Code for mmDGM
Author: Chongxuan Li (chongxuanli1991@gmail.com)
Version = '1.0'
'''
import gpulearn_mm_z_x
import sys, os
import time
import color
n_hidden = (500,500)
if len(sys.argv) > 2:
n_hidden = tuple([int(x) for x in sys.argv[2:]])
nz=500
if os.environ.has_key('nz'):
nz = int(os.environ['nz'])
if os.en... |
e543c7f7f1b249e53b8ebf82641ec398abf557af | 1aff0d35c148c09be620e44211d407657e89e1c5 | /agus.py | 7bc3b305e2f8f3b44cd86fa5aa1c58df507b9903 | [] | no_license | kelompok4konsepemograman/agus | a0da0123a96ab7049a82d33506c49cc229856c99 | 9c2ab3fbde0e6622dd46f3030d6a0c3d1deaadb0 | refs/heads/master | 2020-04-12T00:55:03.573832 | 2018-12-18T02:14:45 | 2018-12-18T02:14:45 | 162,216,311 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 633 | py | agus.py | button6 = Button(tk,text=" ",font=('Times 26 bold'), heigh = 4, width = 8, command=lambda:checker(button6))
button6.grid(row=2, column=2,sticky = S+N+E+W)
button7 = Button(tk,text=" ",font=('Times 26 bold'), heigh = 4, width = 8, command=lambda:checker(button7))
button7.grid(row=3, column=0,sticky = S+N+E+W)
button8 = ... |
647dde6e3288ded29336062b78baacc3a92908a7 | f3ba902cad966384c81a0a2f1ba169f097a9c658 | /src/cian/proxy/scrapper.py | 5843cc6a0b897e6c2fc819c448a43d75dea3c3cb | [] | no_license | tmp-user-17/DS | ad031b4c6752840998704ef912f8792a9e70b272 | cf250d3d87ef117ae0e3da2ea5bc97a5c6d1c174 | refs/heads/main | 2023-05-29T00:50:35.348553 | 2021-06-12T06:55:58 | 2021-06-12T18:57:58 | 376,222,784 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,609 | py | scrapper.py | import re
import random
import requests
from bs4 import BeautifulSoup
import js2py
from fake_useragent import UserAgent
def _get_request_key(session):
res = session.post("https://spys.one/en/socks-proxy-list/")
soup = BeautifulSoup(res.text, 'html.parser')
return soup.find("input", {"name": "xx0"}).get("v... |
aebc8665a97ab0a71b1d8a920b5cbf2643254883 | feb7d82899279c98d9fa780c43330bb1db190204 | /product_object.py | 2db673058c9973bcce1c18f834b9b530daf464f1 | [] | no_license | jackeisenbach3/nest_demo | 9668736645493fa4170b7653a4810e995afbe35d | 3c3577c8a6ec2336faeed884ad73a8f0dd5b8aa2 | refs/heads/master | 2021-01-23T16:05:08.106516 | 2018-06-28T15:47:04 | 2018-06-28T15:47:04 | 102,721,863 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,406 | py | product_object.py | from base_page import Base_Page
import locators
class Product_Object:
"Page Object for the table"
#locators
def get_all_text(self):
"Get the text within the table"
table_text = []
row_doms = self.get_elements(self.rows_xpath)
for index,row_dom in enumerate(row_doms):
... |
79628cc2b4ad402e1a5a0ce43773bd54f78ba71d | 72fe8bf55d5c79d94180227345f3dd18982ad2a1 | /Assignment-1/src/lexer.py | 1216e8473632083094e769d73a7b06ac961c35f9 | [] | no_license | pranjalpl/CS335 | 4861db90ef480845b92d421d2ddaa5004325cf6f | 8ed9b7e88f1da53d0fb184ba344d4c85fcf14d38 | refs/heads/master | 2021-10-27T13:57:14.327864 | 2019-04-17T15:48:52 | 2019-04-17T15:48:52 | 167,984,715 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,842 | py | lexer.py | import ply.lex as lex
import argparse
tokens = ('INT', 'OCT', 'HEX', 'FLOAT', 'STR', 'IMAGINARY', 'RUNE', 'BREAK', 'CASE', 'CHAN', 'CONST', 'CONTINUE', 'DEFAULT', 'DEFER', 'ELSE', 'FALLTHROUGH', 'FOR', 'FUNC', 'GO', 'GOTO', 'IF',
'IMPORT', 'INTERFACE', 'MAP', 'PACKAGE', 'RANGE', 'RETURN', 'SELECT', 'STRUCT',... |
1d591383475c88e4aa5e0a69b44e8ac2b954f8c3 | 0fb0592230d71d695e7f4cae00e0e3366b2057b3 | /Baekjoon/2nd_week/2293_1.py | edca8cc3eb36b980285bfac6eb92678cf1e66d18 | [] | no_license | ririro93/algorithm_probs | 715efc88be354dcfc7576289716f937f3aeb8afd | 47a63e68e1a4a126d0de1831fcbff600223d8055 | refs/heads/master | 2023-06-20T03:52:01.582443 | 2021-07-21T14:43:24 | 2021-07-21T14:43:24 | 237,443,195 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 302 | py | 2293_1.py | # from sys import stdin
# stdin = open('input.txt', 'r')
# input = stdin.readline
# input
n, k = map(int, input().split())
coins = [int(input()) for _ in range(n)]
# init
ans = [1] + [0] * k
# exe
for coin in coins:
for val in range(coin, k+1):
ans[val] += ans[val-coin]
print(ans[-1]) |
4a1be146a5e51c4444b76918f62ad88af6043f00 | 5d0fe4a9e026234fe15e6c4380355061bb4dac64 | /tests/browser/pages/domestic/domestic_eu_exit_contact_us.py | 838a75a93efc17a9973584fec2e68629d7438ba3 | [
"MIT"
] | permissive | uktrade/directory-tests | 37e243862da8ac594cf1ea06ade714db5e1aba03 | 39ec6c26203580238e65566a472cbd80916e6726 | refs/heads/master | 2022-08-09T16:58:56.248982 | 2022-08-01T12:25:10 | 2022-08-01T12:25:10 | 71,367,747 | 4 | 3 | MIT | 2022-08-01T12:26:09 | 2016-10-19T14:48:57 | Python | UTF-8 | Python | false | false | 3,761 | py | domestic_eu_exit_contact_us.py | # -*- coding: utf-8 -*-
"""great.gov.uk Domestic EU Exit Contact us page"""
import random
from types import ModuleType
from typing import List, Union
from uuid import uuid4
from selenium.webdriver.common.by import By
from selenium.webdriver.remote.webdriver import WebDriver
from directory_tests_shared import URLs
fro... |
1756637f8421be94d9ef6428d03f4267b60338c9 | e0883aa71d190ed50a937011b4c0a385219b8590 | /website/views.py | 10d0f12ce8c03d2cbcee33136ed8f1311daad936 | [] | no_license | ManishTirkey/django-FlashCard | 4f0537292591d28b14df75c831f2e314b3cf8756 | f2ac64ff0e133542a2527a393827f519e34e265c | refs/heads/main | 2023-04-07T01:39:47.737811 | 2021-04-04T04:12:38 | 2021-04-04T04:12:38 | 351,894,772 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,495 | py | views.py | from django.shortcuts import render
from django.http import HttpResponse
from random import randint
# Create your views here.
def index(request):
# def index(request, slug):
# active = ""
# if slug =="add":
# slug = "Addition"
# active = "active"
# if slug =="sub":
# slug = "Subtrac... |
e75e1182d67a1b855de86a6d0a71f97f22943e76 | 218e6623e14c82d5945c01a83d14ca81a337379c | /week 1.py | 7d2a8c21eeda4d8836e3e01fbbbdc900436cf400 | [] | no_license | jiae0119/Likelion-Python-Study | 16cd8453fe58a893a11f34bec85433b2b64a5563 | 793422cb7c986bd296f1a08953c02d3391be7400 | refs/heads/master | 2023-07-14T19:28:19.449261 | 2021-08-04T11:37:13 | 2021-08-04T11:37:13 | 388,081,016 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 860 | py | week 1.py | #멋사 파이썬 스터디 1주차 과제 신지애
import random
Adice = random.randint(1,6)
Bdice = random.randint(1,6)
print('주사위 던지기')
print('주사위 1:', Adice)
print('주사위 2:', Bdice)
print()
print('실행할 연산의 종류를 입력하세요.')
print('1. 덧셈 2. 뺄셈 3. 곱셈 4. 나눗셈 5. 나머지 구하기')
cal = int(input('연산종류:'))
if cal == 1:
result= (Adice+Bdice)
print('덧셈... |
d2f962654eaaf1a1446d8181e392b686376b22a5 | 2adaea567cf0007968a725a06c2cb932e56799e9 | /beginner/numbers.py | 6eef7b827e8799c7289f7820fbf7995bac5cccef | [] | no_license | ramyasutraye/python_programming | 0b40177060e8372357c60bb118a58d92e130a2bb | be0eb8aff04251f56ee8f74d8ee552577a0097fd | refs/heads/master | 2020-04-23T19:25:59.976484 | 2018-10-30T09:55:18 | 2018-10-30T09:55:18 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 260 | py | numbers.py | #python code goes here
#python version :3
num0=10
num1=10
num2=10
num3=10
num4=10
num5=10
num6=10
num7=10
num8=10
num9=10
a=num0+num1+num8+num9
b=num0*num7*num8*num9
c=num0/num1
print "addition value",a
print "multiplication value",b
print "division value",c
|
968ddbafc4b2af0ae37e37e8c9768d095cf8b305 | 908f6cd8de7859decbdd18d2b0857c76435bd8da | /config.py | 9f1b7091b1923dec01fd934af73bbd747478f09a | [
"BSD-3-Clause"
] | permissive | Dora-faith-hack/interact-with-BCH | 1fed2109773ecb949de167e83016d6ea9d91427c | 283a685f18e53c616fc6b2e9c3041c07c441d2f7 | refs/heads/master | 2020-03-23T17:03:50.370620 | 2018-07-22T16:49:29 | 2018-07-22T16:49:29 | 141,840,847 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 68 | py | config.py | sender_address = 'bchreg:qzzanl750et6tnzcvle2k59z57zle3msfqc5qslx5n' |
17e2323d366697da0625713cf90edbeb6b5bcf76 | d9b0aaf111734450329b80e5a452de14fdcf9ec6 | /ingest.py | 0d7ae32202449085445ebf2d74e9b68a1ca1cb01 | [] | no_license | saikirandulla/code-challenge | 7f475d17748b41b1f4a5880a5f8fd5a21b2ddeab | 1559be90c931efa5fdad3bcf54dd444c3c9a707c | refs/heads/master | 2020-12-02T08:14:29.898453 | 2017-07-10T17:22:14 | 2017-07-10T17:22:14 | 96,791,914 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 647 | py | ingest.py | import json
from customer import *
from order import *
from siteVisit import *
from image import *
from stats import *
from collections import defaultdict
from datetime import datetime, timedelta
def Ingest(data):
for rec in data:
if rec['type']=='CUSTOMER':
data=customer(rec)
elif rec['ty... |
2c49d6f9c12f3343cd43920ddb9ce5332bace56c | 5a52ccea88f90dd4f1acc2819997fce0dd5ffb7d | /alipay/aop/api/domain/UserOnlineGameDataInfo.py | dc3351734e542cf253b032d165bdb9ca8cea62d2 | [
"Apache-2.0"
] | permissive | alipay/alipay-sdk-python-all | 8bd20882852ffeb70a6e929038bf88ff1d1eff1c | 1fad300587c9e7e099747305ba9077d4cd7afde9 | refs/heads/master | 2023-08-27T21:35:01.778771 | 2023-08-23T07:12:26 | 2023-08-23T07:12:26 | 133,338,689 | 247 | 70 | Apache-2.0 | 2023-04-25T04:54:02 | 2018-05-14T09:40:54 | Python | UTF-8 | Python | false | false | 6,656 | py | UserOnlineGameDataInfo.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.constant.ParamConstants import *
class UserOnlineGameDataInfo(object):
def __init__(self):
self._end_time = None
self._out_user_game_no = None
self._start_time = None
self._user_data_calory = None
... |
b96d98d86050e7a83233aec0d9dc0d06949605a0 | f3939fa12b465d1c0e750dd7a6b5d9eebdbbe2c7 | /myenv/Lib/site-packages/django_git/views.py | 93c76b4b65b8fa7eb3e82062c5a625bf2e1e0c7f | [] | no_license | jsonknightlee/wiwik | b38bbf5e5a0f5ba94f0f2e258a9c091633f87858 | ae4fda497ef9e212b22a007bb1763ba22d797cc2 | refs/heads/master | 2022-11-09T22:39:19.675721 | 2016-08-20T21:01:31 | 2016-08-20T21:01:31 | 66,097,881 | 0 | 1 | null | 2022-10-08T04:21:40 | 2016-08-19T16:53:09 | Python | UTF-8 | Python | false | false | 1,215 | py | views.py | from pygments import highlight
from pygments.lexers import guess_lexer_for_filename
from pygments.formatters import HtmlFormatter
from django.http import HttpResponse
from django.shortcuts import render_to_response, get_object_or_404, get_list_or_404
from django.template import RequestContext
from django_git.utils im... |
a38df5df3963f68cddbb4cb38aa88489f0705974 | b01ba0b4c20e5dabbbbc30b09a3bea1ddd281a81 | /authentication/accounts/urls.py | 3c50b38a52b8e85e5e11bc5c31b1579f039cf982 | [] | no_license | krish-kunal/API | 41b598acdcf89e5a27993b5d046a64b80f0fef5b | d82e36f03b1a951155de585a7bd8f585b66d6536 | refs/heads/master | 2020-04-19T16:05:46.142225 | 2019-01-30T07:17:59 | 2019-01-30T07:17:59 | 168,293,810 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 391 | py | urls.py | from django.urls import path
from . import views
from rest_framework.urlpatterns import format_suffix_patterns
urlpatterns=[
path("login",views.login,name='login page'),
path("create",views.create,name='new account'),
path("forgot",views.reset,name='change password'),
path("reset",views.reset,name='res... |
c9f83c9ee7ec7fbe3545197d9728e312a0e4df8f | eceb83fb90e1c6241fbd7c4faae616c5ae9f6e78 | /accounts/views.py | 48474199512c0b858afb930601310ddede18c8a9 | [] | no_license | geekpius/pyvote | a1769ec07137b76cd004afba0d9eab624f6c7a84 | 8a9658a59eb9cc593566c1eb61c4092bb4885b53 | refs/heads/main | 2023-01-19T12:00:48.226434 | 2020-11-25T18:36:25 | 2020-11-25T18:36:25 | 307,179,123 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,976 | py | views.py | from django.shortcuts import render, redirect
from django.http import HttpResponse, JsonResponse
from django.template import loader
from django.contrib.auth import authenticate, login, logout
from django.contrib.auth.mixins import LoginRequiredMixin
from django.contrib import messages
from django.views import View
from... |
fee551dc8a0510f79bca483696633b7c0b5af82f | d331f24bdaccd6963ff3e11378731b8c9ff94826 | /ordis/__main__.py | a6ff8835c0758173cea99aca9bf6a7406f1f511e | [
"MIT"
] | permissive | Xithrius/Ordis | e37061a839a64a0e814b4872422b419bfdf1ccce | dae2c1c0df3852758710f50714ba1618fe7534df | refs/heads/main | 2023-04-07T21:12:23.489334 | 2023-03-28T05:01:01 | 2023-03-28T05:01:01 | 350,932,593 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 126 | py | __main__.py | import asyncio
from ordis.bot import Ordis
async def main():
bot = Ordis()
await bot.start()
asyncio.run(main())
|
cfd48f932c19956511a69910b6936f42ca40a019 | 7489fb7a111091574f48cf1195266442ae24f2b2 | /shilitori.py | 9c6e2e1e8c2c0c6fe9702e848793b3cf6d58bd2f | [
"MIT"
] | permissive | RyoFuji2005/ShilitoriPY-CUI | 13b6923420ea9ad372dd3ced01ee617a616234bd | 83321bfa51ba9e3de29ee242a2c42f1b7c4e1e2b | refs/heads/main | 2023-07-17T06:51:17.076205 | 2021-08-28T18:05:25 | 2021-08-28T18:05:25 | 400,593,749 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,397 | py | shilitori.py |
# (c)2021 Ryo Fujinami.
# インポート
import random
import os
from converters import word_dict, long_dict, voice_dict, kana_dict
# エラーか判定
def judge_error(pword, pwf, cwe, occur):
if pwf != cwe:
print('初めの文字を確認してください')
elif len(pword) <= 1:
print('1文字の単語は禁止です')
elif len(pword) > 10:
pri... |
1e20830d7fb509ea67ad56afcd3cbb32e10e3c89 | 5fefcd078a421ddd00bc2cdd0f205a0942e983e4 | /yencap-manager-3/DeviceStatusManager.py | b2be9a994eb494414e10562167dd890ed0ea7684 | [] | no_license | backtosource/EnSuite | 0ae2b6935d3aaf6ba7c7ef21761a1e0209e345ab | e82f0694b4f6d5f64b5449fbc37dfc9864b2dce7 | refs/heads/master | 2020-07-18T22:51:33.533130 | 2019-09-05T14:47:18 | 2019-09-05T14:47:18 | 206,328,215 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 369 | py | DeviceStatusManager.py | from threading import Thread
import time
class DeviceStatusManager ( Thread ):
def __init__(self, agents):
Thread.__init__(self)
self.agents = agents
self.running = True
def run ( self ):
while self.running:
time.sleep(1)
for agent in self.agents:
#print 'refresh status'
agent.refreshSta... |
a88895c7324ebc5bbeca8e90b441d161d6abc415 | 96ed85956ebd04df8815926ab34513c5b9948df5 | /login/migrations/0001_initial.py | efe8e8035dd422a27a39fb11f2da86c0b3edf654 | [] | no_license | zghnwsq/WebDemo | 5cf176c039c9d0b80a60f7c3ce696b6e74e144ce | 7de8a2d7c81b8114631b34aecff71529448a5440 | refs/heads/master | 2022-12-11T22:03:50.086419 | 2020-03-25T06:54:45 | 2020-03-25T06:54:45 | 166,916,763 | 0 | 0 | null | 2022-12-08T05:04:46 | 2019-01-22T02:55:36 | Python | UTF-8 | Python | false | false | 1,073 | py | 0001_initial.py | # Generated by Django 2.1.5 on 2019-02-26 02:42
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
('auth', '0009_alter_user_last_name_max_length'),
]
operations = [
migrations.CreateModel... |
c79c3ec4601a00555ca950cf3fcd78bf6996ee91 | 4c326e1f678243543a8a5bf869a9ff7f27bb8c25 | /tests/test_generator.py | ae33db25270cc8411d678f30ea66c11fc59ff4e5 | [] | no_license | Dohako/cicd_gen | 503db319c0948c061802bf275c71a6f3f06dac1d | f3c53f333ffb98ccd541a2f540def3c20963a30c | refs/heads/main | 2023-03-05T07:09:50.300453 | 2021-02-20T12:03:03 | 2021-02-20T12:03:03 | 340,026,111 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 406 | py | test_generator.py | import unittest
from buzz import generator
def test_sample_single_word():
l = ('foo','bar','foobar')
word = generator.sample(l)
assert word in l
def test_sample_multiple_words():
l = ('foo','bar','foobar')
words = generator.sample(l,2)
assert len(words) == 2
def test_generate_buzz_of_at_le... |
241e2c6387cb89a9f6bf4f7aca142b054b3f0ee9 | 7c132bd454898d1bff17c06dabac23aa351ccb28 | /raspberrypi/uploadDynamo.py | 6e02e11f7642ebf44bdd394885fbbf7e46694165 | [] | no_license | YeonjinKim15/who-is-there | b9dfe0258f31ddb24f8b294f1fb3ba89e0a2f847 | 5e2569450c65045c01d986dc1defe981a29604e6 | refs/heads/main | 2023-02-21T16:03:29.729609 | 2021-01-28T06:59:37 | 2021-01-28T06:59:37 | 333,520,604 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,130 | py | uploadDynamo.py | import os
import sys
import datetime
import time
import picamera
try:
import boto3
import threading
import RPi.GPIO as GPIO
print("All Modules Loaded ......")
except Exception as e:
print("Error {}".format(e))
"""
Global variable
"""
distance = 0
sensor_id = 0
date = ' '
now = ' '
img = ' '
class ... |
8ab7d746783fe7f518937503a01931b90946f274 | 2ebc69a40676a43c6b4b56755b34b54328b896c1 | /taskset.py | 20c86e64c4f486484f98b4bda696a8d03589a4d3 | [] | no_license | argos-research/taskgen | e5544f605786203e25622826b0ac4751b4a09412 | 79e9715234682a198b7dd1568cb8d4821b1c2bd5 | refs/heads/master | 2021-05-10T09:25:58.915124 | 2018-01-31T09:29:08 | 2018-01-31T09:29:08 | 118,927,001 | 1 | 2 | null | 2018-01-31T09:29:09 | 2018-01-25T14:58:32 | Python | UTF-8 | Python | false | false | 3,152 | py | taskset.py | """Module for task-set implementation
"""
import xmltodict
from collections.abc import Iterable
from abc import ABCMeta, abstractmethod
import itertools
import random
from taskgen.task import Task
class TaskSet(Iterable):
"""Container for tasks"""
def __init__(self, tasks=[]):
"""Initialize a... |
15bd57f87fb26faebf9225ccefd09da252c3f11f | 55b8253ec5524b3fec6ab3c833ff5f94341672dd | /TSTSpredingCircle.py | 47d0775e902e80dd12bf47f249425e9efc917fbc | [] | no_license | jrlego0331/FINAL-CircleSpreder | fddce88a9da9d82246b4e56603b654adb077ac59 | af5bc87ef42761f9520b20e32c2f18663e3bea79 | refs/heads/master | 2021-10-29T04:01:38.955209 | 2019-02-16T05:13:39 | 2019-02-16T05:13:39 | 170,965,231 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,353 | py | TSTSpredingCircle.py | import pygame
import os
import sys
import random as r
import math
import time
class circleCal():
def __init__(self):
self.dotNum = 10
self.midAng = 360 / self.dotNum
self.growRate = 5
def AcutalMathCal(self):
for n in range(len(the.Circle)):
MPOSX = t... |
87555be44364e92ce11e1f457692ff4203c6f77d | 3b2b4171f5b5031f56e5ca0f288953fa74e336f0 | /1.two_sum.py | 175839c8db54cf5088ec4bebc47578a7f875d095 | [] | no_license | firedraky/LeetCodeOJ | cd46f48c59d3a6890f5bcb86d40809f6d0ce5b5d | 4697941383d337501f33eb7321391dc86fa2aa05 | refs/heads/master | 2020-03-29T22:55:24.720079 | 2015-09-08T13:31:24 | 2015-09-08T13:31:24 | 40,898,211 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,007 | py | 1.two_sum.py | #---coding:utf-8---
__author__ = 'hxlcj'
"""
Given an array of integers, find two numbers such that they add up to a specific target number.
The function twoSum should return indices of the two numbers such that they add up to the target,
where index1 must be less than index2.
Please note that your returned answers (bo... |
ee5e0b0c9ff6329c7232135d8eadd6db1f26c8ce | 0a8f92f221729eec2ef6509ff3c577e2271a382b | /libspn/tests/test_learning.py | 25b89fd2691ab44943703d2d2b086f41ca0608dd | [
"MIT"
] | permissive | jostosh/libspn-1 | ad7e95a083efc32570a088b3d684f21e5621028f | 4bddbb3321802cea9420682c793e090656acab5b | refs/heads/master | 2020-05-07T16:07:54.700092 | 2019-02-28T22:20:58 | 2019-02-28T22:20:58 | 180,669,643 | 0 | 1 | NOASSERTION | 2019-04-10T21:56:45 | 2019-04-10T21:56:45 | null | UTF-8 | Python | false | false | 232 | py | test_learning.py | #!/usr/bin/env python3
from test import TestCase
# from context import libspn as spn
import tensorflow as tf
class TestLearning(TestCase):
def test_hard_em(self):
pass
if __name__ == '__main__':
tf.test.main()
|
f914a3ff1690054469be5ab7a5153ac9f6e67c44 | f46bbdab011e66c9d266965e2b2c0e046b80aa6b | /linear-regression/sklearndiamonds.py | 0147300419b4baebd0b9e8ce69549d021b19c671 | [] | no_license | julianny-favinha/mc886-machine-learning | f874cbfa8f1fca5badd2315e42f9a17c4cdc8dbd | 4535c2611051ae04b11ddc65d3719b431ae10d78 | refs/heads/master | 2021-07-22T00:54:31.355951 | 2020-04-20T17:54:25 | 2020-04-20T17:54:25 | 145,845,446 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,159 | py | sklearndiamonds.py | import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
import time
from sklearn import datasets, linear_model
from sklearn.metrics import mean_squared_error
from ParseDiamondsSet import numberVariables
start_time = time.time()
xs_train, xs_validation, xs_test, y_train, y_validation, y_test = numberVa... |
0279bc3306698bb9f25ee67db095609160027d70 | e429eb5223834b9dd474f530de800b5b044eae89 | /lab2/mycrypt.py | 758a92c711bec0a7b82fdaf7864493e4cf7eba0d | [] | no_license | seng-2021/lab-ee | b31b5df5ca2113e97a3f3bfdb4eb7b090c3bebdf | 3d84729b00ea4918d1789e887c699366b506678c | refs/heads/master | 2023-03-08T22:37:39.886693 | 2021-03-12T00:04:14 | 2021-03-12T00:04:14 | 334,095,132 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 770 | py | mycrypt.py | import codecs
def encode(s):
if not isinstance(s,str):
raise TypeError
origlen = len(s)
crypted = ""
digitmapping = dict(zip('1234567890!"#€%&/()=','!"#€%&/()=1234567890'))
if len(s) > 1000:
raise ValueError
s = s.ljust(1000, "o")
error = ["å","ä","ö"]
... |
1138f5a86be089a3de3f673802f860fdfa0c69a3 | fd6969b81aa7dab443602c92d94f92cd43812234 | /models.py | 45f549e2370c285017b39972fc8b61d1e6e29093 | [] | no_license | ggoyal01/wts | b46a489121b5d882b7d6b5e7771438b59139c5c7 | c7f4ca9e206311d3114a79d02b5bc5f42ab08076 | refs/heads/master | 2023-03-28T09:32:02.352021 | 2021-03-31T09:27:03 | 2021-03-31T09:27:03 | 352,780,670 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,288 | py | models.py | from datetime import datetime
from marshmallow import Schema, fields, validate, post_load, post_dump, pre_load
from config import Config
from server import db
class User(db.Model):
id = db.Column(db.Integer, primary_key=True)
phone = db.Column(db.String(20), index=True, unique=True, nullable=False)
def... |
0b71807cc2345c495311f358e5d28aa5fc21b6e5 | b041baf74ad7e684f4da7581f28d8c5702c4bce3 | /astigmia/lobby/views.py | 10f803ffd23c1b12192956a2c36c58d000d24c6d | [
"MIT"
] | permissive | marcus-crane/astigmia | 19071a476bbce1832c755779e6c14fa91f611e1e | f5c778a433626bf021b6a7cb343d2fbe92bc75af | refs/heads/master | 2023-02-03T09:22:55.588315 | 2020-12-16T04:24:42 | 2020-12-16T04:24:42 | 309,615,603 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 147 | py | views.py | from django.http import HttpResponse
def index(request):
# TODO: Stick a proper homepage here
return HttpResponse("Please take a seat.")
|
b7f34d0559caf1d614a267b76be0b14d0863fbe2 | 8f67c17a10d03de741b63e5c56425ba0f8e47eba | /Naive Solution/Angle Between Hands of a Clock.py | f70d332908b336b8b8946a21329628ce21b68170 | [] | no_license | aquariumm/Coding-Interview-Prep | 6ddb703ee27242c1f9aa52f103cd95c5e3182aee | e439dd690674135253df7ff9b12ca695ad95d62a | refs/heads/master | 2023-02-13T03:53:24.895308 | 2021-01-22T05:38:50 | 2021-01-22T05:38:50 | 264,508,496 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,390 | py | Angle Between Hands of a Clock.py | '''
Rumtime:
time: O(1) since only arithmatic logics are used and no loops
space: O(1) since no extra space needed
Analysis:
Given: hour in [1, 12] and minute in [0, 59]
Ask: return the angle difference between hour hand and minute hand, e.g.
Input: hour = 12, minutes = 3... |
515940fcd7a5d3e4cb7fb3db7a8b2a95215b6820 | 402cb8ac32c5ca7a53f5875688d1ebba1e96474b | /set142.py | 57fea3aa0c601897b8c9c2c1be047f06db3ed92e | [] | no_license | Srija-U/codekataplayer | c073a13d8621f641a8aba8f23ebee4e1b673d58f | 392f24f35f178b034cfb76d2acc31bbc4b3a5814 | refs/heads/master | 2020-05-02T10:59:45.052802 | 2019-07-22T00:27:46 | 2019-07-22T00:27:46 | 177,914,184 | 1 | 3 | null | null | null | null | UTF-8 | Python | false | false | 221 | py | set142.py | s=input()
s=list(s)
l=[]
c=0
for i in range(len(s)-1):
k=int(s[i])+int(s[i+1])
if k%2!=0:
c+=1
else:
l.append(c)
c=0
l.append(c)
m=max(l)
if m==0:
print(0)
else:
print(m+1)
|
dd2f57d65313658d9de58dc4655fd823243d5e01 | 025c0f686ee9957b34b1d18e225818044cf04181 | /2019/Day7/rgc.py | 6e4507e40151a13dde191b7db8b6f4ff75fd0fa4 | [] | no_license | ls-jason-rossiter/adventOfCode | 266c4bd9ac1e59f4c165edf9a5f0b252b8db8efb | d9226470a85423e6b3918938add9a685888394ee | refs/heads/master | 2023-02-10T16:49:50.094793 | 2020-12-25T12:25:36 | 2020-12-25T12:25:36 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,598 | py | rgc.py | #!/usr/bin/env python3
import sys
import math
from itertools import permutations
def doMachine(inp,s,pos):
output= []
inpptr=0
skip= 0
#print("Position",pos, inp)
while(True):
instr=s[pos]%100
mode1= (int(s[pos]/100))%10
mode2= (int(s[pos]/1000))%10
mode3= (int(s[pos]/10000))%10
#print(pos,s[pos],instr,... |
106bdebdf36ede1d09e362393fb8600029c39ab3 | 6557c0e178be57f23a4f6109beac9cec06ebc98c | /apps.py | 96d533ab983188478f23e68062eab1cc3166d626 | [] | no_license | PakawiNz/django_securest | 8430153bb2f5e1737c9bfe83fdc9e9acc25e2d07 | 652a9b35abd6a7463e2d226be98d359d07114acc | refs/heads/master | 2020-06-19T12:34:06.069299 | 2019-06-13T10:36:05 | 2019-06-13T10:36:05 | 196,709,327 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 259 | py | apps.py | import os
from django.apps import AppConfig
API_KEY_LENGTH = 64
SECRET_KEY_LENGTH = 64
class DjangoSecurestConfig(AppConfig):
name = os.path.relpath(os.path.dirname(__file__), os.getcwd()).replace(os.path.sep, '.')
verbose_name = "Django Securest"
|
4b177e152be61a2568980737270ebad97993def3 | 7b2cb82f2971c04f1e08dc6014ece4931d8c0cee | /tests/test_strconv/test_url.py | 0b930130a57fbd5c37cddd8c7845b259d49be621 | [
"MIT"
] | permissive | kozalosev/textUtilsBot | cdbceb3d9644ff0f829587baac90870cd07401ef | d5b1a7dd82d9e6701c18d8112b059f226baa9774 | refs/heads/master | 2023-09-04T02:57:20.549073 | 2023-08-25T23:38:18 | 2023-08-25T23:59:16 | 123,640,218 | 6 | 1 | MIT | 2023-08-25T23:59:17 | 2018-03-02T23:06:59 | Python | UTF-8 | Python | false | false | 1,861 | py | test_url.py | from strconv.url import URLEncoder, URLDecoder
url = "http://сайт.рф/путь;параметр=значение?запрос1=значение1&запрос2=значение2#хэш"
encoded_url = "http://xn--80aswg.xn--p1ai/%D0%BF%D1%83%D1%82%D1%8C;%D0%BF%D0%B0%D1%80%D0%B0%D0%BC%D0%B5%D1%82%D1%80=%D0%B7%D0%BD%D0%B0%D1%87%D0%B5%D0%BD%D0%B8%D0%B5?%D0%B7%D0%B0%D0%BF%D1... |
3debe80e39f8398b300b5a6c04ddb7596446f7f8 | bae360023637bfa179dacbcc93c98617b2c03db1 | /tests/db/meta/test_model.py | a86b91154c6f488cd1494324a0544764b43c0351 | [
"MIT"
] | permissive | NdubisiOnuora/django-sorcery | 480090591fc9c1259b3b5c9371bf27ed1293d8b8 | 2d22ecece2e7585aae99566201892d8af46879b3 | refs/heads/master | 2020-05-21T11:39:10.576479 | 2019-05-09T21:56:09 | 2019-05-09T21:56:09 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,088 | py | test_model.py | # -*- coding: utf-8 -*-
from __future__ import absolute_import, print_function, unicode_literals
import sqlalchemy as sa
from django_sorcery.db import meta # noqa
from ...base import TestCase
from ...testapp.models import Business, CompositePkModel, Owner, Vehicle
class TestModelMeta(TestCase):
def test_model... |
869711dbb339238039dcaa9c6460dafb71960ab1 | 28a5450065d87272ae94e5026e8a9f34322f2d3b | /separation.py | e531bec202c7dc0a1ec39251e299a91ff8384e84 | [] | no_license | ZCpioneer/Data_distribution_conversion | b8e961e15a51a1ceab17d2f69a1d8dd3e3641018 | 8bdde88cb2dec0b2d2b5d5053f03b79b01c6e575 | refs/heads/master | 2020-07-02T16:50:33.254760 | 2019-08-10T07:53:41 | 2019-08-10T07:53:41 | 201,594,928 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,875 | py | separation.py | import numpy as np
"""
目的是分离数据,将一列中的多种数据分离成多列的位置区分数据
传入一维数据,能转化成以列位置作为数据区分的多维数据
作者:zc
时间:2019/8/10
"""
def separation(labels):
"""
目的是分离数据,将一列中的多种数据分离成多列的位置区分数据
:param labels: 标签数据
:return: 拆分好的新数组
"""
labels_index, kind = separation_kind(labels)
new_labels = []
resultA... |
4f4c2210adf94c8e776a246ddbdf2649b4df374f | 2229e7ccbac3beee7351fc36f2bf7be748d0a747 | /QsPKG/qsModule.py | 2e4b219d19f96499c56d7c68e157d3603fc05592 | [] | no_license | QueenieCplusplus/PyPkgModuleFunc | 34f325d5bb8726822e7959207c8ea8bcd2125ede | e98d76cfd2256044556e782dee4ee7398cab69d5 | refs/heads/master | 2021-01-05T02:15:01.591803 | 2020-02-16T06:29:46 | 2020-02-16T06:29:46 | 240,841,218 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 209 | py | qsModule.py | # 0216, by QueenPy
# this is a file as Module
# under a folder (root) as PKG
def qs_func():
res = 'Hi this Func Res'
print(res)
# Main Thread in Life cycle
if __name__ == '__main__':
qs_func()
|
16a5df35e8847ba7c3f1f8d094501b603b96dac6 | 9ca9cad46f2358717394f39e2cfac2af4a2f5aca | /Week02/Main_HW/Nested Lists/Nested Lists_LHJ.py | 91a2d90714f5f01e72890666a0ac44250ad9d747 | [] | no_license | Artinto/Python_and_AI_Study | ddfd165d1598914e99a125c3019a740a7791f6f6 | 953ff3780287825afe9ed5f9b45017359707d07a | refs/heads/main | 2023-05-05T15:42:25.963855 | 2021-05-24T12:24:31 | 2021-05-24T12:24:31 | 325,218,591 | 1 | 3 | null | null | null | null | UTF-8 | Python | false | false | 320 | py | Nested Lists_LHJ.py | if __name__ == '__main__':
arr = {}
for _ in range(int(input())):
name = input()
score = float(input())
if score in arr.keys():
arr[score].append(name)
else:
arr[score] = [name]
score = sorted(arr)[1]
print(*sorted(arr[score]), sep='\n')
|
8142c59cd966349e828e843886842b214bddc656 | de24f83a5e3768a2638ebcf13cbe717e75740168 | /moodledata/vpl_data/17/usersdata/71/6583/submittedfiles/lecker.py | 3ce802b52f382eada72356e41b9cf7dba10e0c5c | [] | no_license | rafaelperazzo/programacao-web | 95643423a35c44613b0f64bed05bd34780fe2436 | 170dd5440afb9ee68a973f3de13a99aa4c735d79 | refs/heads/master | 2021-01-12T14:06:25.773146 | 2017-12-22T16:05:45 | 2017-12-22T16:05:45 | 69,566,344 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 208 | py | lecker.py | # -*- coding: utf-8 -*-
from __future__ import division
import math
a = input("Insira o valor de a: ")
b = input("Insira o valor de b: ")
c = input("Insira o valor de c: ")
d = input("Insira o valor de d: ")
|
9c2c82cc963b4a48010ed606cabd3640fca85399 | 977ce20511a0b35a63235a14d0d7b3e4c4cbd95a | /iast/views/project_delete.py | d5d9a181afdc0197407e3f7199c32f399aa77b81 | [
"Apache-2.0"
] | permissive | 1015203948/DongTai-webapi | 497ba4280513278b2495d8f1775b0bf6de5c9529 | f77ba3d7fb3ea4d34fbc53e2456235bb0f321eee | refs/heads/main | 2023-08-28T15:45:09.443819 | 2021-11-02T08:38:39 | 2021-11-02T08:38:39 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,876 | py | project_delete.py | #!/usr/bin/env python
# -*- coding:utf-8 -*-
# author:owefsad
# software: PyCharm
# project: lingzhi-webapi
import logging
from dongtai.endpoint import R
from dongtai.endpoint import UserEndPoint
from dongtai.models.agent import IastAgent
from dongtai.models.project import IastProject
from django.utils.translation imp... |
79386f3b5a0ad66f6a8559b031a44dbe63b1dbe8 | 7af83ee80a78157eaf0ea7ae8ec90d74a68e4088 | /bikeshare_data/models.py | fc6a56ba533bce16909904214928bbf2621e0e3a | [
"MIT"
] | permissive | ananyaramkumar/bikeshare | baa35107a94d02dd394170f8c966695c25c31bb0 | 8e402b331dd6c2721c7633879a4981a38303fbb2 | refs/heads/master | 2022-12-12T13:59:42.016654 | 2018-11-05T06:11:52 | 2018-11-05T06:11:52 | 156,162,603 | 0 | 0 | MIT | 2022-12-08T01:16:31 | 2018-11-05T04:52:32 | JavaScript | UTF-8 | Python | false | false | 267 | py | models.py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models
# Create your models here.
class Data(models.Model):
#image
image = models.ImageField(upload_to = 'images/')
#textsummary
summary = models.CharField(max_length = 200) |
662b827aed48328f74df1454861c61377b4defa7 | bbff50d94efc9bc27a449fd5adcfde0a2ee3b5bf | /codechef/DEC19B/BINADD.py | 372e1b7e093ff43917ddea29ad01863e03006d67 | [] | no_license | ameybhavsar24/competitive-programming | 389b1ffb9f3d11e18bb90b0bb03127086af2b1f0 | c9f74f4b9dba34b9d98d9e6c433d3d7890eaa63b | refs/heads/main | 2023-07-04T17:03:39.699518 | 2021-08-09T14:27:08 | 2021-08-09T14:27:08 | 379,605,431 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 226 | py | BINADD.py | # your code goes here
def solve(x,y):
A = int(x,2)
B = int(y,2)
c=0
while B>0:
U = A ^ B
V = A & B
A = U
B = 2*V
c+=1
return c
t = int(input())
while(t):
A = input()
B = input()
print(solve(A,B))
t-=1 |
c60fa7bd215a4b830e9c7c7c35523cf30b17211b | d719a07f5469c95c4a81edbe6f497a6c4a93d9d3 | /p13b.py | 1d05c3457ede0bf9bf3f5d77f97e3969c0ef7023 | [] | no_license | Hemangi3598/chap_10_p13b | 2f08df5dd1fb3187a70080a5af8676f991dcb28d | 2882395a2e6f92bce7e2f0ee84ab90374aeb523b | refs/heads/main | 2023-07-18T19:04:54.995085 | 2021-09-21T08:09:14 | 2021-09-21T08:09:14 | 408,737,469 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 328 | py | p13b.py | #p3) write into a file
import os
filename = input("enter file name to write ninto ")
if os.path.exists(filename):
f = None
try:
with open(filename, "a") as f:
data = input(" enter data to written ")
f.write(data + "\n")
except Exception as e:
print("issue", e)
else:
print(filename ," does not e... |
9ab7d5f320801cd1864c410299bffbb272b2287b | 370ec01a8d8ef987fccb01f803356689487e0a2d | /scan_all.py | 72b6804d6a4b81c829af823110131978670d4c97 | [
"Apache-2.0"
] | permissive | yuta-hono/bigtable-demo | 9985980586d9b20262f557a2ea5dba6f511ec4d2 | b98abc41d08b153610b90099ca1255ffcf9c4727 | refs/heads/master | 2021-08-29T21:33:13.998653 | 2017-12-15T02:58:49 | 2017-12-15T02:58:49 | 114,319,805 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,030 | py | scan_all.py | #!/usr/bin/env python
# Copyright 2016 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... |
d077a9ee23442d97db430847f793f4f899055b0e | b1e5ecbc4b4f86729b361002e3d2904e95200892 | /dice_generator/generate.py | e680db625b3d1990c2453e7b458922b15a746104 | [] | no_license | shauvik/yahtzee | b9d63db8fabf0ca32e29015ef643528a026f593e | 0a16106d054b8dece3a22cd368db88de63c41afb | refs/heads/master | 2022-12-04T03:31:35.878778 | 2020-08-27T11:29:55 | 2020-08-27T11:29:55 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,109 | py | generate.py | import svgwrite
size = 300
r = size / 10
dwg = svgwrite.Drawing('.svg', profile='tiny')
base = dwg.rect((0, 0), (size, size),rx=r, ry=r, stroke="black", fill="white")
left_top = dwg.circle((size / 5, size / 5), r, stroke="black")
left_bottom = dwg.circle((size / 5, size / 5 * 4), r, stroke="black")
right_top = dw... |
d345d0551039fcb34813f48676a83dcd3af163c0 | 5874b08fdf9df8afcf3536bbacf82494eab392e0 | /django/django_fundamentals/django_intro/great_number_project/greater_number_app/apps.py | 8474741a8a0c1252a556477789301b9a5ed769e0 | [
"MIT"
] | permissive | fatimaalheeh/python_stack | 702cc325551f62efa529bb5d6cba0ba8f7ee3006 | 9ba84e6dc030a65494f105152a97f0a38aa2e4f3 | refs/heads/main | 2023-05-12T23:56:27.300776 | 2021-05-28T19:54:35 | 2021-05-28T19:54:35 | 367,609,694 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 109 | py | apps.py | from django.apps import AppConfig
class GreaterNumberAppConfig(AppConfig):
name = 'greater_number_app'
|
9c9c189d1cab28e7cd9dfa39b2b7868e12d0d86a | 80b6d81cb6ac1c6afb1b9258b6fc2d66a2271660 | /vgg_net/test.py | 7291f8dfb798a6a3b2efdf1175826ef21aa7bd54 | [] | no_license | zbzckai/kreas_class | 8b72043eee200bdfc137b92f7c2b2acfaaee32ab | 1d4c686184beaec41594b126a50d65b022cc7aba | refs/heads/master | 2020-06-16T21:33:02.309085 | 2019-07-11T05:43:37 | 2019-07-11T05:43:37 | 195,710,400 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,186 | py | test.py | # -*- coding: utf-8 -*-
# @Time : 2019\7\9 0009 16:58
# @Author : 凯
# @File : test.py
from __future__ import print_function
import glob
import numpy as np
import warnings
import os
from keras import layers, backend, models
from keras.optimizers import SGD
from keras.models import Model
from keras.layers import F... |
1714cbf217a397f9c09b3eaa4bc476be592d8f67 | 093ff421eea6a66e87c8bd6147c62c56fd620b8d | /Meu_bot.py | 550bb55dbdb44767828af6d540a0c95735f6d06f | [] | no_license | JaoBigode/Bot-Discord.py-Teste- | 09f35e03866535862174d33be36fb7091930b7d7 | 721b89983064fde911ba816b2ccdf07a3196de94 | refs/heads/main | 2023-08-25T04:34:05.168145 | 2021-10-23T11:09:45 | 2021-10-23T11:09:45 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 982 | py | Meu_bot.py | import discord
import os
from discord.flags import Intents
class MyClient(discord.Client):
async def on_ready(self):
print('Logged on as {0}!'.format(self.user))
async def on_message(self, message):
print('Message from {0.author}: {0.content}'.format(message))
if message.content == '!r... |
65144c17108460cca44829f82db5eed65d1eeb31 | 4ca1364d002c82f4dff16577cbff202653db35db | /test_demo.py | 3043991f6fa83523653a9802c0eee1e81b416a3b | [
"MIT"
] | permissive | sbrauer/pytest_spec | 7c8cb4126eb75caa82d53da4ee387987b1bf2cbb | c76eca3e07d59a5bbc2de82509b1fe9014166109 | refs/heads/master | 2021-01-02T09:21:12.810381 | 2015-10-01T18:42:27 | 2015-10-01T18:44:32 | 39,788,159 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,323 | py | test_demo.py | from pytest_spec import it, describe, context
# Basic usage: a top-level test function.
@it('generates test name dynamically')
def spec():
assert True
# You can use `describe` to organize related tests.
with describe('Foo bar'):
@it('does this')
def spec():
assert True
@it('does that')
de... |
e01b93f86b147cb29104d44a06830b6ca7f01f3a | f71cd15d3c9f0f310dcea79aed4e481bd6842d84 | /Warunki/csvki.py | 0714f52af3ff85eda47c731c0e313d6da284ebb5 | [] | no_license | Kotzyk/Warunki | ca048d9cb0cdb42cea1d1227b8c4669459eacdeb | 8334924c27ae8d6fa2ab17e98065c4e072f830ee | refs/heads/master | 2020-04-06T05:48:28.696106 | 2016-06-10T12:14:21 | 2016-06-10T12:14:21 | 57,775,803 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 907 | py | csvki.py | ilosc = [(1, 4), (2, 6), (3, 5), (4, 5), (5, 6), (6, 7), (7, 2), (8, 4), (9, 2), (10, 3), (11, 2), (12, 3), (13, 2),
(14, 3), (15, 1), (16, 3), (17, 1), (18, 1)]
for (x, y) in ilosc:
for b in range(1,y+1):
try:
f = open("Skrypty/" + str(x) + "-" + str(b) + ".sql", "w")
... |
063188f845c56181290f7a9a1d8e067ea653caef | a11295ff8e4bb3496ab27e0f498611fe216cbe87 | /Modules/DataCollector.py | 1e24bca36339b43059670b7b7b882b2005ab69ce | [] | no_license | sshakuf/PYBootstrap | b31252fc45359b7fb53b322b2a45957187276d66 | adc17f78c99e9970ca78fb3c0011442d0e118fb9 | refs/heads/master | 2023-03-22T15:11:54.698381 | 2020-06-24T08:20:51 | 2020-06-24T08:20:51 | 269,376,103 | 0 | 0 | null | 2021-03-20T04:17:33 | 2020-06-04T14:05:39 | Python | UTF-8 | Python | false | false | 8,904 | py | DataCollector.py | from Modules.Helpers.LogHelper import *
from Modules.V4L.V4L2MidLevel import *
from tools.EngineComponent import *
from tools.Engine import *
from Modules.Helpers.ReadWriteLock import *
from tools.DataStore import *
import time
import matplotlib.animation as animation
import matplotlib.pyplot as plt
#from mpl_toolkits.... |
79a3ba85318da41a93c42f8d72ae61d4b2310337 | 7e2e3fe16bbcec5d03b258cef8eb03742d28c2ac | /DoAn/DoAn_1/tach_tu.py | e02e523e620c35d311008f6d4f49f50e1ec0ac40 | [] | no_license | nghiaphan177/NLP | 99bf0afd292c2ddff1581a8c2effb4b051503bbd | 3ae9e772af703b94c695fdb8141b7ed26f153596 | refs/heads/main | 2023-02-06T20:45:41.472234 | 2020-12-30T04:15:12 | 2020-12-30T04:15:12 | 325,450,443 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,778 | py | tach_tu.py | import subprocess
from matplotlib import image, pyplot
from numpy import asarray
import pickle
import re
def makeSymbols(dictionary):
f = open('sym.txt', "wt", encoding='utf-8')
i = 0
f.write('# {}\n'.format(i))
for word in dictionary:
i += 1
f.write("{} {}\n".format(word, i... |
61ae5da0966c38dd7a8a1fc002598ee41ccceedd | 7f97814acd76ca96aee877fd70d401380f848fae | /1_training/qn1fib.py | c25a52d0fa731d41dfc041ba6f7adab0cb2a6d1f | [] | no_license | tberhanu/all_trainings | 80cc4948868928af3da16cc3c5b8a9ab18377d08 | e4e83d7c71a72e64c6e55096a609cec9091b78fa | refs/heads/master | 2020-04-13T12:12:21.272316 | 2019-03-16T04:22:20 | 2019-03-16T04:22:20 | 163,195,802 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 777 | py | qn1fib.py | #!/usr/bin/env python3.7
import unittest
def fib(n):
"""
:param n: integer
:return: the nth fibonnaci number
"""
dict = {0: 0, 1: 1}
return fibonnacci(n, dict)
def fibonnacci(n, dict):
"""
:param n: integer
:param dict: dictionary (used for memoization)
:return: the nth fibon... |
24290f3a6cf9a0a272186a505d31c62a6f278c86 | 733598d7d5a8ab03e6ab55aaffb924310314dc55 | /even_fibonacci.py | 198ddc1f89a3f5e45bc98c368fec995b72a84c34 | [] | no_license | skafis/CodeKata | 8dbd4ecfb4ba10b0f3d63c7fdb1f46e77a87d20d | 4a29038673ad555ab696d7a491de471a3cccbbd7 | refs/heads/master | 2021-01-22T22:57:25.474452 | 2015-03-16T13:27:03 | 2015-03-16T13:27:03 | 32,020,775 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 527 | py | even_fibonacci.py | #! /usr/bin/env python
#printing the sum of the even Fibonacci numbers
n= int(raw_input("enter your number"))
sumeven=0
# Defining the Fibonacci function
def fib(n):
a,b = 0,1 #first numbers of the sequence
while 1:
yield a
a,b = b,a+b #generator for the next number in the sequence
a = fib(n)
for i in range(n... |
1fbd4e45b061b4d6cefb46e3bc612533ec94250b | 83ef16b77eb2d1c1b003c0b66f326109dff8ae8a | /Code/grid_from_file.py | 8758a1d17f389cb50030b084e211a182542a017d | [] | no_license | sbha2431/Sandia | 1639f46e42fbaa4fea4c0a9603a2db775ee2e60a | c6098c180a06f4b24e0deb289ebe889c92c79ede | refs/heads/master | 2021-07-14T10:42:45.408194 | 2019-02-27T17:32:35 | 2019-02-27T17:32:35 | 114,945,230 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 15,103 | py | grid_from_file.py | __author__ = 'sudab'
""" Generate a grid world """
import os, sys, getopt, pdb, string
import random
import numpy as np
import pygame
from skimage import io
import cv2
import pygame.locals as pgl
class Gridworld():
# a gridworld with uneven terrain
def __init__(self, filename=None, initial=0, nrows=8, ncols=8,... |
759ff4cc123e85bdc8c1457bb521cd35841956cd | 8e08bea20bf2d182462a1b254f1d88ca6e501140 | /Detection machine/Face&Eye Detection/face_eye_detection_image.py | ff4eaf8e37874e3c238296140daa6bffb5a381b8 | [] | no_license | vineethpilli/Open-CV-Projects | 3b262db4a239902b8854d9c1f73d96f9b5e9550a | e4257413d815483665bb77e023c731f69f293f4e | refs/heads/main | 2023-02-06T18:13:33.339688 | 2020-12-19T18:02:02 | 2020-12-19T18:02:02 | 318,774,126 | 2 | 0 | null | 2020-12-05T11:45:39 | 2020-12-05T11:45:38 | null | UTF-8 | Python | false | false | 385 | py | face_eye_detection_image.py | import numpy as np
import cv2
face_cascade = cv2.CascadeClassifier('haarcascade_frontalface_default.xml')
eye_cascade = cv2.CascadeClassifier('haarcascade_eye.xml')
img = cv2.imread('modi.jpg')
gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
faces = face_cascade.detectMultiScale(gray, 1.3, 5)
#Write the for loop code h... |
1d524312cbd3b735850046131f31c03fdfa90bbc | 664ec4456535e45a85831606fd857a79fa25e87c | /test_for_dict.py | e92af18b9fe041c2455f70fc373b2a5c4849f4d1 | [] | no_license | tanyatrell/Lesson2 | bd2df78cf87412caa219db5641d51109718dd318 | 42eee9a4f342394309e2827f4f44e950afe2ae74 | refs/heads/master | 2021-08-23T02:25:23.183235 | 2017-12-02T14:02:47 | 2017-12-02T14:02:47 | 111,996,485 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 100 | py | test_for_dict.py | my_dict = {'one': '1', 'two': '2'}
for key in my_dict:
print('{} - {}'.format(key, my_dict[key])) |
add56d52f3c88f814a166d12c3bc5a5906268864 | 1c1d29017fccdb326fca1f4a51794f212a4e6bb5 | /django/puppet/urls.py | af92fc33313a824a3c39c66862bef471413ca6d9 | [] | no_license | ucdavis/ucdpuppet | fd5713f7d16884a98ec26d5407c871d42d0bba11 | 96377375d062de16cd80a52afd8a02b7a21b536f | refs/heads/master | 2021-07-30T14:25:43.226908 | 2021-07-21T02:14:04 | 2021-07-21T02:14:04 | 8,210,644 | 9 | 4 | null | 2016-04-26T18:21:21 | 2013-02-15T00:34:54 | Puppet | UTF-8 | Python | false | false | 547 | py | urls.py | from django.conf.urls import url
from . import views
urlpatterns = [
url(r'^class/([^/]+)/?$', views.puppet_class, name='puppet-class'),
url(r'^edit-host/(?P<fqdn>[^/]+)?/?$', views.edit_host, name='edit-host'),
url(r'^add-host/(?P<fqdn>[^/]+)?/?$', views.add_host, name='add-host'),
url(r'^delete/([^/... |
00e9872136e5753364117adbf60793e660c8bef0 | dbe83cf6c2b78a61def862ca19625c2f78268af8 | /ibis/backends/mssql/tests/test_client.py | 7f35bf3ca1c7bb8f19fc1f97379d0cb4ebcb7c3b | [
"Apache-2.0"
] | permissive | ibis-project/ibis | 56a169d75805db7dfd39192cf0562521c405ff1c | 3866492906d731dc170b560e7d7471bd4855169a | refs/heads/master | 2023-09-01T17:07:38.854510 | 2023-09-01T13:52:08 | 2023-09-01T15:32:04 | 34,139,230 | 2,304 | 384 | Apache-2.0 | 2023-09-14T21:52:21 | 2015-04-17T20:43:46 | Python | UTF-8 | Python | false | false | 2,719 | py | test_client.py | from __future__ import annotations
import pytest
from pytest import param
import ibis
import ibis.expr.datatypes as dt
from ibis.backends.base.sql.alchemy.geospatial import geospatial_supported
DB_TYPES = [
# Exact numbers
("BIGINT", dt.int64),
("BIT", dt.boolean),
("DECIMAL", dt.Decimal(precision=18... |
25aa0766505b22588107d44e15c3596e9383d4e9 | c8f5b7fc5bd5de3e086dfe573adbd8d3d675fc5f | /attic/gui/devices/haakephoenix.py | 4e2fb4891f180cdc54e0f119c49a96a806908a42 | [
"BSD-3-Clause"
] | permissive | awacha/cct | 3b44fd7cf7a66dc3112abae3d8a156e26aad8c22 | 4a00f6817843d287680787725ba917cf801d9063 | refs/heads/master | 2023-02-03T17:18:55.624721 | 2022-08-22T06:20:28 | 2022-08-22T06:20:28 | 44,253,619 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 8,076 | py | haakephoenix.py | import datetime
from ..core.indicator import Indicator, IndicatorState
from ..core.toolwindow import ToolWindow
class HaakePhoenix(ToolWindow):
required_devices = ['haakephoenix']
def __init__(self, *args, **wargs):
self.indicators = {}
super().__init__(*args, **wargs)
def init_gui(self... |
de6b9961e0572338c87802314e7ae3cded5168b4 | a88e00a6901c6d3e45e969b882965a623ed6a249 | /[course] Machine Learning by Andrew Ng/8 AnomalyDetection/ex8(2).py | b644a82800157e454cd1e2020ba784f5129e01cf | [] | no_license | Jinnzenn/MLprojects | b937797be275075af33244437b383b43b1d83ad7 | f1a0685339c9c44bd33c453b5afb543710c21a41 | refs/heads/master | 2020-05-26T18:52:49.650410 | 2019-11-11T12:16:57 | 2019-11-11T12:16:57 | 188,340,026 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,160 | py | ex8(2).py | import matplotlib.pyplot as plt
import numpy as np
import scipy.io as scio
import estimateGaussian as eg
import multivariateGaussian as mvg
import visualizeFit as vf
import selectThreshold as st
plt.ion()
# np.set_printoptions(formatter={'float': '{: 0.6f}'.format})
'''第1部分 加载示例数据集'''
#先通过一个小数据集进行异常检测 便于可视化
# 数据集... |
e37e468d8a41b8711fb0eb4ddec7db67691f9156 | 5524ccd9d4519fb18f551f4fb35b834fd758ca16 | /apgl/generator/AbstractGraphGenerator.py | 2167fe4a718174b55387c30fd2c05e74d9137e9b | [
"BSD-3-Clause"
] | permissive | charanpald/APGL | 8e53280a2edcc64563bc05cb805a9729f9092381 | f8b71be2c49c62ace7ce5691216d2ff041ff978b | refs/heads/master | 2021-07-14T22:39:19.516943 | 2020-07-29T07:09:41 | 2020-07-29T07:09:41 | 3,709,301 | 14 | 7 | BSD-3-Clause | 2020-07-29T07:09:43 | 2012-03-13T17:35:56 | Python | UTF-8 | Python | false | false | 327 | py | AbstractGraphGenerator.py | '''
Created on 3 Jul 2009
@author: charanpal
An abstract base class which represents a graph generator. The graph generator
takes an existing empty graph and produces edges over it.
'''
from apgl.util.Util import Util
class AbstractGraphGenerator(object):
def generate(self, graph):
Util.abst... |
dc226a646af32d052c6d51832b95a340d6986e08 | a8db9f10c2da6b5c6ee717969c9d4a3d6c1193b2 | /method_inside_Dict.py | 27c90191046016982840bb8beae767f1e5572517 | [] | no_license | Artem-Vorobiov/AI_starcraft | ba4258e8d0ef427c918a4bfc686987c15062ec81 | 69c8e4ae19b00cd694d32d80b16b9b3b961c7b21 | refs/heads/master | 2020-03-27T22:34:54.928546 | 2018-10-11T19:43:10 | 2018-10-11T19:43:10 | 147,243,525 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 526 | py | method_inside_Dict.py |
print('\n')
# Первый вариант
def fn1():
print("One")
def fn2():
print("Two")
def fn3():
print("Three")
fndict = {"A": fn1, "B": fn2, "C": fn3}
keynames = ["A", "B", "C"]
fndict[keynames[1]]()
fndict['C']()
# Второй вариант
def add(one,two):
c = one+two
print(c)
print(type(c))
def sub(one,two... |
316d1a49c82147170a99c2e2657f99929bde40f2 | 22f74a7639c7c70dc93216a0c9b787ce9861d0af | /compressed-image-transmission/client.py | d8c735e1a7013c20ed9b858c9987904d31798a87 | [] | no_license | RodolfoOsorio/tcp-ip-image-transference | d6db934816f345c56c8dd33459543103be39467f | c9f8a6d7f3147220b195e8e2352f4934f2739181 | refs/heads/main | 2023-02-11T10:38:21.885855 | 2021-01-15T01:36:55 | 2021-01-15T01:36:55 | 329,455,162 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 618 | py | client.py |
import socket
# Protocolos
socket_client = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
# Que puertos
socket_client.connect( (<"SERVER DNS"> , <CLIENT PORT>) ) # FOLLOW README INSTRUCTIONS AND REPLACE WITH REAL PARAMETERS
#socket_client.connect( ("0.tcp.ngrok.io", 13547))
#socket_client.connect( ("localhost", 9... |
00c69640acbdd347e4fda41059496dbbc2d9efb5 | 8123cde9b394d0fbac188fd1f6c7fa18be3eb290 | /loginDemo/tests/test_login/test_login2.py | f1cc31e7fd99c57c0699a66df535923bf28b4852 | [] | no_license | frankyangkun/Test0402 | 7e321ed44b57d7b548f99b9c18c6969c17ae0456 | 4ee4df0434e5ed02155c75944893ffe94a79548d | refs/heads/master | 2021-05-24T07:16:33.070070 | 2021-02-08T06:35:47 | 2021-02-08T06:35:47 | 253,448,155 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,182 | py | test_login2.py | # -*- coding:utf8 -*-
"""
2020-05-13
测试数据分离
"""
import requests
import pytest
param = [
({"Content-Type": "application/json"}, {"loginAccount": "pzadmin", "password": "96E79218965EB72C92A549DD5A330112", "userType": "individual"}),
({"Content-Type": "application/json"}, {"loginAccount": "201808230@sefon.com", "... |
c5c8b702345a0d311de6db5395f255b18f6dd92f | a530e7e71d1c2187a79904df12b9bf78493f7a13 | /zhijian_svm/new_classifier.py | 155d44b2db682b1401b13a7948a346ff8b327dc2 | [] | no_license | ayuileng/zhijianju | e1b9606d4015d1f2db0fb2fe112d7cdf0cf6321e | d1a361bb10b7a46bc49fd0da99a1252c10bbe5ac | refs/heads/master | 2021-07-16T19:10:01.509090 | 2018-10-22T11:42:42 | 2018-10-22T11:42:42 | 103,008,949 | 3 | 2 | null | 2018-10-22T09:05:22 | 2017-09-10T06:30:52 | Java | UTF-8 | Python | false | false | 4,702 | py | new_classifier.py | # -*- coding: utf-8 -*-
"""
Created on Sun Jun 17 19:52:44 2018
@author: Gu Yi
"""
# 特征选择
import pandas as pd
import numpy as np
import jieba as jb
def is_ustr(in_str):
out_str = ''
for i in range(len(in_str)):
if is_uchar(in_str[i]):
out_str = out_str + in_str[i]
else:
... |
0937484800965992e0ebe50ca2b4f82d38c68756 | 9debbc341695cfb9bb11182ee642914821e659a4 | /lesson9ex6.py | db03e8213b4c4a4c00e9850ccb5fb2b27a64a97d | [] | no_license | Zinat411/try1 | 141217aa2ae660eb81e31b525eecbdca04ba0d5a | 1e997327b59ffdb8e3cf6cb2193045bcbbf37d05 | refs/heads/main | 2023-01-03T05:33:05.083169 | 2020-10-18T17:09:20 | 2020-10-18T17:09:20 | 304,938,481 | 0 | 0 | null | 2020-10-17T18:23:37 | 2020-10-17T18:00:49 | Python | UTF-8 | Python | false | false | 129 | py | lesson9ex6.py | list2 = [i for i in range(1,99)]
for i in list2:
if i % 7 == 0:
print('Boom'),
else:
print (i),
|
5829592fceee7b1cc668560738ab8c3f2a8ab634 | e8f25ceeaa9cf1b4780db0f40ffa37480c990d4a | /szegedweather.py | b10945b860f9b11e6982617956272c522348357f | [] | no_license | DanKoszeg/pdplotter | 7e0df090ddc89edf6ee015095a33729aa7d95c94 | ea499d970095aeaf6438530a5e894fe3f063d945 | refs/heads/master | 2021-09-07T06:15:36.982941 | 2017-10-29T17:42:53 | 2017-10-29T17:42:53 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,168 | py | szegedweather.py | ### szakdoga, szeged idลjรกrรกs modell v1
#
#elkรฉpzelรฉsek:
# 1 idลsorosan kielemzem, predikciรณt adok, รฉs visszamรฉrem az adat-
# bรกzist
# 2
#
# 3
#
#
###
#==============================================================================
# Ötletláda:
# a fejléceket külön egységesen f... |
f5c2774a40b95b79554c3473c9c42ee6b09fb9a2 | 762fbfd9a5c10a6e3eb4bd49b6f6e364fe05b811 | /JustJump.py | b68314a371bbd93ca9a712b6a74434d18a9324a7 | [] | no_license | beru26/Python_Game_1 | 526b9499fc5ea480afa82b5edddf8fbe9d3de51b | 1bb88f6ccdd9d99337ca0a374cc7ac1672b72002 | refs/heads/master | 2021-01-21T15:07:15.323475 | 2016-06-14T10:31:33 | 2016-06-14T10:31:33 | 58,525,507 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,588 | py | JustJump.py | import curses
import time
import random
def speed_setting(barrierx, s):
speed = 0.03
if barrierx == 0:
barrierx = 79
elif s > 100 and s < 300:
speed = 0.02
elif s > 300 and s < 600:
speed = 0.015
elif s > 600:
speed = 0.01
time.sleep(speed)
return barrierx, ... |
a66f750b7d36cc86ce0d0ed3649dea808a1c7ec8 | fdca8cdb5817581a1fb985674180a37277190d56 | /baseline.py | 9a67dde3aa26755beb5d0bec433602674590a03d | [] | no_license | timHan1968/NER-Tagging | 634dcda23923ae13b366094988119ae32047e481 | caa7b4db995d3a6248c342cfc3362579bf501849 | refs/heads/master | 2020-04-22T08:06:45.830626 | 2019-02-12T18:21:12 | 2019-02-12T18:21:12 | 170,233,600 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,034 | py | baseline.py | """
This python script constructs a baseline NER tagging model.
"""
import preprocess
class Baseline:
"""
The baseline tagging model class......
"""
def __init__(self, filepath):
"""
The constructor initializes the corpus to be stored in the model.
It creates a dictionary of tokens and taggs. Also a defau... |
bfa09abd07d76481d8367ee0f2b91e3c12ca28d0 | e3beed9ba1440cfe94a861bdefffd776e2e43b57 | /dedup_searched.py | 69a36dcf0f404919dbac734ac498903bf2db4e79 | [] | no_license | BryanKoo/YoutubeEmbedUtils | a4a3347e24f8800ccc7a872d8e3af574f706237d | e65f4eb1dd04afe8036fb2859573b5ea315a06a4 | refs/heads/master | 2020-03-25T14:28:26.149227 | 2020-03-06T12:18:57 | 2020-03-06T12:18:57 | 143,858,042 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,249 | py | dedup_searched.py | #-*- coding: utf-8 -*-
# find video urls of given channels
# find screenshot urls as well
import codecs, chardet
import os
import sys
import pdb
reload(sys)
sys.setdefaultencoding('utf-8')
def dedup_searched(vfile):
videos = []
videos_hashed = {}
fp = codecs.open(vfile, 'r', encoding='utf-8')
while True:
l... |
5a679bdd297dd1c1a5f1382775b0377eb2f27dd9 | ae0f8d21703dea619110a1d84f5788425d1560a2 | /main/admin.py | b4b561856b673f44d73d6eb9474c8034e301897f | [] | no_license | mskwarcan/portfolio | f893dbf9a6f11d9f5e6a4d61ed35a6a8f5406855 | f9da37e99a35128b653a0e4a16f49435a5e81e68 | refs/heads/master | 2021-01-20T22:28:58.996771 | 2017-01-18T04:05:34 | 2017-01-18T04:05:34 | 64,619,377 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 294 | py | admin.py | from django.contrib import admin
from .models import Project
from .models import Tag
from .models import Image
from django.contrib.sites.models import Site
# Register your models here.
admin.site.register(Project)
admin.site.register(Tag)
admin.site.register(Image)
admin.site.unregister(Site) |
30c32a1cb2f122bd1a8ee0db6b5f304665597c55 | 00105c419908d9d1b978d74a3afff5e2e0f0c243 | /Convert_Filter.py | dec064d48347b698054395aa9e4820f6fd101cef | [
"MIT"
] | permissive | taitcha/ferndale_citations_study | 4401644b0459e696b8a1002d9b34612f9c40c79c | dcb165e41e5df1d1475e1f6fd5b8941d14bd9b44 | refs/heads/master | 2021-04-26T21:51:02.625185 | 2018-11-15T23:18:15 | 2018-11-15T23:18:15 | 124,164,838 | 1 | 1 | null | 2018-04-03T04:56:42 | 2018-03-07T02:08:07 | Python | UTF-8 | Python | false | false | 4,984 | py | Convert_Filter.py | import datetime
import pandas as pd
import matplotlib.pyplot as plt
def filterData(citations, startYear, endYear, gender="All", age=(0,150)):
## Track how many citations the previous filters already took out
countFiltered = 0
## Exclude to certain dates (year/month/day)
startDate = datetime.date(start... |